Merge pull request #119 from rhansen/force-daemon
Do not prevent daemonization when force is set
This commit is contained in:
commit
dc37e00d9d
1 changed files with 2 additions and 3 deletions
5
ddclient
5
ddclient
|
@ -823,8 +823,8 @@ my $caught_int = 0;
|
||||||
$SIG{'HUP'} = sub { $caught_hup = 1; };
|
$SIG{'HUP'} = sub { $caught_hup = 1; };
|
||||||
$SIG{'TERM'} = sub { $caught_term = 1; };
|
$SIG{'TERM'} = sub { $caught_term = 1; };
|
||||||
$SIG{'INT'} = sub { $caught_int = 1; };
|
$SIG{'INT'} = sub { $caught_int = 1; };
|
||||||
# don't fork() if foreground or force is on
|
# don't fork() if foreground
|
||||||
if (opt('foreground') || opt('force')) {
|
if (opt('foreground')) {
|
||||||
;
|
;
|
||||||
} elsif (opt('daemon')) {
|
} elsif (opt('daemon')) {
|
||||||
$SIG{'CHLD'} = 'IGNORE';
|
$SIG{'CHLD'} = 'IGNORE';
|
||||||
|
@ -866,7 +866,6 @@ do {
|
||||||
unless exists $ip_strategies{lc opt('use')};
|
unless exists $ip_strategies{lc opt('use')};
|
||||||
|
|
||||||
$daemon = opt('daemon');
|
$daemon = opt('daemon');
|
||||||
$daemon = 0 if opt('force');
|
|
||||||
|
|
||||||
update_nics();
|
update_nics();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue