Merge pull request #133 from rhansen/pid-only-if-daemonized
Only write the PID file if daemonized
This commit is contained in:
commit
104c3245ce
1 changed files with 1 additions and 5 deletions
6
ddclient
6
ddclient
|
@ -740,7 +740,7 @@ my @opt = (
|
|||
[ "protocol", "=s", "-protocol type : update protocol used" ],
|
||||
[ "file", "=s", "-file path : load configuration information from 'path'" ],
|
||||
[ "cache", "=s", "-cache path : record address used in 'path'" ],
|
||||
[ "pid", "=s", "-pid path : record process id in 'path'" ],
|
||||
[ "pid", "=s", "-pid path : record process id in 'path' if daemonized" ],
|
||||
"",
|
||||
[ "use", "=s", "-use which : how the should IP address be obtained." ],
|
||||
&ip_strategies_usage(),
|
||||
|
@ -837,10 +837,6 @@ if (opt('foreground')) {
|
|||
open(STDOUT, ">/dev/null");
|
||||
open(STDERR, ">/dev/null");
|
||||
open(STDIN, "</dev/null");
|
||||
}
|
||||
|
||||
# write out the pid file if we're daemon'ized
|
||||
if (opt('daemon')) {
|
||||
write_pid();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue