From 816216ee291da954f94c53be7ec16a49f613fdba Mon Sep 17 00:00:00 2001 From: David Kerr Date: Fri, 18 Mar 2016 13:07:26 -0400 Subject: [PATCH] use "HERE Document" method for calling cURL command. --- ddclient | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ddclient b/ddclient index d59846b..cd88594 100755 --- a/ddclient +++ b/ddclient @@ -2186,9 +2186,11 @@ sub geturl { $0 = sprintf("%s - curl sending to %s", $program, '${protocol}://${server}/${url}'); my $timeout = opt('timeout'); - $reply = `/usr/bin/curl -si0 --user "${login}:${password}" --user-agent "${program}/${version}" \\ + $reply = <<`USE_CURL`; + /usr/bin/curl -si0 --user '${login}:${password}' --user-agent '${program}/${version}' \\ --connect-timeout $timeout --max-time $timeout $curlopt \\ - --url "${protocol}://${server}/${url}" 2>/dev/null`; + --url '${protocol}://${server}/${url}' 2>/dev/null +USE_CURL if (! $reply) { warning("curl cannot connect to ${protocol}://${server}/${url}");