use "HERE Document" method for calling cURL command.
This commit is contained in:
parent
d5e8b32353
commit
816216ee29
1 changed files with 4 additions and 2 deletions
6
ddclient
6
ddclient
|
|
@ -2186,9 +2186,11 @@ sub geturl {
|
||||||
$0 = sprintf("%s - curl sending to %s", $program, '${protocol}://${server}/${url}');
|
$0 = sprintf("%s - curl sending to %s", $program, '${protocol}://${server}/${url}');
|
||||||
my $timeout = opt('timeout');
|
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 \\
|
--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) {
|
if (! $reply) {
|
||||||
warning("curl cannot connect to ${protocol}://${server}/${url}");
|
warning("curl cannot connect to ${protocol}://${server}/${url}");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue