Merge pull request #267 from rhansen/help-text
This commit is contained in:
commit
985f591aec
1 changed files with 63 additions and 57 deletions
92
ddclient.in
92
ddclient.in
|
@ -341,18 +341,21 @@ my %builtinfw = (
|
||||||
);
|
);
|
||||||
|
|
||||||
my %ip_strategies = (
|
my %ip_strategies = (
|
||||||
'ip' => ": obtain IP from -ip {address}",
|
'ip' => ": use IP given by '-ip <address>'",
|
||||||
'web' => ": obtain IP from an IP discovery page on the web",
|
'web' => ": obtain IP from the web-based IP discovery service given by '-web <service>|<url>'",
|
||||||
'fw' => ": obtain IP from the firewall specified by -fw {type|address}",
|
'fw' => ": obtain IP from a firewall/router device by visiting the URL given by '-fw <url>'",
|
||||||
'if' => ": obtain IP from the -if {interface}",
|
'if' => ": obtain IP from the interface given by '-if <interface>'",
|
||||||
'cmd' => ": obtain IP from the -cmd {external-command}",
|
'cmd' => ": obtain IP by running the command given by '-cmd <command>'",
|
||||||
'cisco' => ": obtain IP from Cisco FW at the -fw {address}",
|
'cisco' => ": obtain IP from Cisco FW device at the address given by '-fw <address>'",
|
||||||
'cisco-asa' => ": obtain IP from Cisco ASA at the -fw {address}",
|
'cisco-asa' => ": obtain IP from Cisco ASA device at the address given by '-fw <address>'",
|
||||||
map { $_ => sprintf ": obtain IP from %s at the -fw {address}", $builtinfw{$_}->{'name'} } keys %builtinfw,
|
map({ $_ => sprintf(": obtain IP from %s device at the address given by '-fw <address>'",
|
||||||
|
$builtinfw{$_}->{'name'}) }
|
||||||
|
keys(%builtinfw)),
|
||||||
);
|
);
|
||||||
|
|
||||||
sub ip_strategies_usage {
|
sub ip_strategies_usage {
|
||||||
return map { sprintf(" -use=%-22s %s.", $_, $ip_strategies{$_}) } sort keys %ip_strategies;
|
return map({ sprintf(" -use=%-22s %s.", $_, $ip_strategies{$_}) }
|
||||||
|
('ip', 'web', 'if', 'cmd', 'fw', sort('cisco', 'cisco-asa', keys(%builtinfw))));
|
||||||
}
|
}
|
||||||
|
|
||||||
sub setv {
|
sub setv {
|
||||||
|
@ -758,60 +761,63 @@ $opt{'fw-banlocal'} = sub { warning("'-fw-banlocal' is deprecated and does nothi
|
||||||
my @opt = (
|
my @opt = (
|
||||||
"usage: ${program} [options]",
|
"usage: ${program} [options]",
|
||||||
"options are:",
|
"options are:",
|
||||||
[ "daemon", "=s", "-daemon delay : run as a daemon, specify delay as an interval." ],
|
["daemon", "=s", "-daemon <delay> : run as a daemon, specify <delay> as an interval"],
|
||||||
["foreground", "!", "-foreground : do not fork"],
|
["foreground", "!", "-foreground : do not fork"],
|
||||||
[ "proxy", "=s", "-proxy host : use 'host' as the HTTP proxy" ],
|
["proxy", "=s", "-proxy <host> : use <host> as the HTTP proxy"],
|
||||||
[ "server", "=s", "-server host : update DNS information on 'host'" ],
|
["server", "=s", "-server <host> : update DNS information on <host>"],
|
||||||
[ "protocol", "=s", "-protocol type : update protocol used" ],
|
["protocol", "=s", "-protocol <type> : update protocol used"],
|
||||||
[ "file", "=s", "-file path : load configuration information from 'path'" ],
|
["file", "=s", "-file <path> : load configuration information from <path>"],
|
||||||
[ "cache", "=s", "-cache path : record address used in 'path'" ],
|
["cache", "=s", "-cache <path> : record address used in <path>"],
|
||||||
[ "pid", "=s", "-pid path : record process id in 'path' if daemonized" ],
|
["pid", "=s", "-pid <path> : record process id in <path> if daemonized"],
|
||||||
"",
|
"",
|
||||||
[ "use", "=s", "-use which : how the should IP address be obtained." ],
|
["use", "=s", "-use <which> : how the IP address should be obtained"],
|
||||||
&ip_strategies_usage(),
|
&ip_strategies_usage(),
|
||||||
"",
|
"",
|
||||||
[ "ip", "=s", "-ip address : set the IP address to 'address'" ],
|
" Options that apply to 'use=ip':",
|
||||||
|
["ip", "=s", "-ip <address> : set the IP address to <address>"],
|
||||||
"",
|
"",
|
||||||
[ "if", "=s", "-if interface : obtain IP address from 'interface'" ],
|
" Options that apply to 'use=if':",
|
||||||
[ "if-skip", "=s", "-if-skip pattern : skip any IP addresses before 'pattern' in the output of 'ip address show dev {if}' (or 'ifconfig {if}')" ],
|
["if", "=s", "-if <interface> : obtain IP address from <interface>"],
|
||||||
|
["if-skip", "=s", "-if-skip <pattern> : skip any IP addresses before <pattern> in the output of 'ip address show dev <interface>' (or 'ifconfig <interface>')"],
|
||||||
"",
|
"",
|
||||||
[ "web", "=s", "-web provider|url : obtain IP address from provider's IP checking page" ],
|
" Options that apply to 'use=web':",
|
||||||
[ "web-skip", "=s", "-web-skip pattern : skip any IP addresses before 'pattern' on the web provider|url" ],
|
["web", "=s", "-web <service>|<url> : obtain IP address from a web-based IP discovery service, either a known <service> or a custom <url>"],
|
||||||
|
["web-skip", "=s", "-web-skip <pattern> : skip any IP addresses before <pattern> in the text returned from the web-based IP discovery service"],
|
||||||
"",
|
"",
|
||||||
[ "fw", "=s", "-fw address|url : obtain IP address from firewall at 'address'" ],
|
" Options that apply to 'use=fw' and 'use=<device>':",
|
||||||
[ "fw-skip", "=s", "-fw-skip pattern : skip any IP addresses before 'pattern' on the firewall address|url" ],
|
["fw", "=s", "-fw <address>|<url> : obtain IP address from device with IP address <address> or URL <url>"],
|
||||||
[ "fw-login", "=s", "-fw-login login : use 'login' when getting IP from fw" ],
|
["fw-skip", "=s", "-fw-skip <pattern> : skip any IP addresses before <pattern> in the text returned from the device"],
|
||||||
[ "fw-password", "=s", "-fw-password secret : use password 'secret' when getting IP from fw" ],
|
["fw-login", "=s", "-fw-login <login> : use <login> when getting the IP from the device"],
|
||||||
|
["fw-password", "=s", "-fw-password <secret> : use password <secret> when getting the IP from the device"],
|
||||||
"",
|
"",
|
||||||
[ "cmd", "=s", "-cmd program : obtain IP address from by calling {program}" ],
|
" Options that apply to 'use=cmd':",
|
||||||
[ "cmd-skip", "=s", "-cmd-skip pattern : skip any IP addresses before 'pattern' in the output of {cmd}" ],
|
["cmd", "=s", "-cmd <command> : obtain IP address from the output of <command>"],
|
||||||
|
["cmd-skip", "=s", "-cmd-skip <pattern> : skip any IP addresses before <pattern> in the command's output"],
|
||||||
"",
|
"",
|
||||||
[ "login", "=s", "-login user : login as 'user'" ],
|
["login", "=s", "-login <user> : log in to the dynamic DNS service as <user>"],
|
||||||
[ "password", "=s", "-password secret : use password 'secret'" ],
|
["password", "=s", "-password <secret> : log in to the dynamic DNS service with password <secret>"],
|
||||||
[ "host", "=s", "-host host : update DNS information for 'host'" ],
|
["host", "=s", "-host <host> : update DNS information for <host>"],
|
||||||
"",
|
"",
|
||||||
[ "options", "=s", "-options opt,opt : optional per-service arguments (see below)" ],
|
["options", "=s", "-options <opt>=<val>[,<opt>=<val>,...]\n : optional per-service arguments (see below)"],
|
||||||
"",
|
"",
|
||||||
["ssl", "!", "-{no}ssl : do updates over encrypted SSL connection"],
|
["ssl", "!", "-{no}ssl : do updates over encrypted SSL connection"],
|
||||||
[ "ssl_ca_dir", "=s", "-ssl_ca_dir : directory containing certificates of trusted certificate authorities (default: auto-detect)" ],
|
["ssl_ca_dir", "=s", "-ssl_ca_dir <dir> : look in <dir> for certificates of trusted certificate authorities (default: auto-detect)"],
|
||||||
[ "ssl_ca_file", "=s", "-ssl_ca_file : file containing certificates of trusted certificate authorities (default: auto-detect)" ],
|
["ssl_ca_file", "=s", "-ssl_ca_file <file> : look at <file> for certificates of trusted certificate authorities (default: auto-detect)"],
|
||||||
[ "retry", "!", "-{no}retry : retry failed updates." ],
|
["retry", "!", "-{no}retry : retry failed updates"],
|
||||||
["force", "!", "-{no}force : force an update even if the update may be unnecessary"],
|
["force", "!", "-{no}force : force an update even if the update may be unnecessary"],
|
||||||
[ "timeout", "=i", "-timeout max : wait at most 'max' seconds for the host to respond" ],
|
["timeout", "=i", "-timeout <max> : when fetching a URL, wait at most <max> seconds for a response"],
|
||||||
|
|
||||||
["syslog", "!", "-{no}syslog : log messages to syslog"],
|
["syslog", "!", "-{no}syslog : log messages to syslog"],
|
||||||
[ "facility", "=s", "-facility {type} : log messages to syslog to facility {type}" ],
|
["facility", "=s", "-facility <type> : log messages to syslog to facility <type>"],
|
||||||
[ "priority", "=s", "-priority {pri} : log messages to syslog with priority {pri}" ],
|
["priority", "=s", "-priority <pri> : log messages to syslog with priority <pri>"],
|
||||||
[ "mail", "=s", "-mail address : e-mail messages to {address}" ],
|
["mail", "=s", "-mail <address> : e-mail messages to <address>"],
|
||||||
[ "mail-failure","=s", "-mail-failure address : e-mail messages for failed updates to {address}" ],
|
["mail-failure", "=s", "-mail-failure <addr> : e-mail messages for failed updates to <addr>"],
|
||||||
["exec", "!", "-{no}exec : do {not} execute; just show what would be done"],
|
["exec", "!", "-{no}exec : do {not} execute; just show what would be done"],
|
||||||
["debug", "!", "-{no}debug : print {no} debugging information"],
|
["debug", "!", "-{no}debug : print {no} debugging information"],
|
||||||
["verbose", "!", "-{no}verbose : print {no} verbose information"],
|
["verbose", "!", "-{no}verbose : print {no} verbose information"],
|
||||||
["quiet", "!", "-{no}quiet : print {no} messages for unnecessary updates"],
|
["quiet", "!", "-{no}quiet : print {no} messages for unnecessary updates"],
|
||||||
["ipv6", "!", "-{no}ipv6 : use ipv6"],
|
["ipv6", "!", "-{no}ipv6 : use ipv6"],
|
||||||
[ "help", "", "-help : this message" ],
|
["help", "", "-help : display this message and exit"],
|
||||||
["postscript", "", "-postscript : script to run after updating ddclient, has new IP as param"],
|
["postscript", "", "-postscript : script to run after updating ddclient, has new IP as param"],
|
||||||
|
|
||||||
["query", "!", "-{no}query : print {no} ip addresses and exit"],
|
["query", "!", "-{no}query : print {no} ip addresses and exit"],
|
||||||
["fw-banlocal", "!", ""], ## deprecated
|
["fw-banlocal", "!", ""], ## deprecated
|
||||||
["test", "!", ""], ## hidden
|
["test", "!", ""], ## hidden
|
||||||
|
|
Loading…
Reference in a new issue