Skip to content

Commit a004498

Browse files
committed
Don't try to kill lookup-domain-daemon if not running
#1032
1 parent 1063750 commit a004498

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

feature-spam.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1397,13 +1397,14 @@ sub setup_lookup_domain_daemon
13971397
&foreign_require("init");
13981398
local $pidfile = "$ENV{'WEBMIN_VAR'}/lookup-domain-daemon.pid";
13991399
local $helper = &get_api_helper_command();
1400+
local $killcmd = &has_command('kill');
14001401
if (!&init::action_status("lookup-domain")) {
14011402
# Need to create and start the action
14021403
&init::enable_at_boot(
14031404
"lookup-domain",
14041405
"Daemon for quickly looking up Virtualmin servers from procmail",
14051406
"$helper lookup-domain-daemon",
1406-
"@{[&has_command('kill')]} `cat $pidfile`",
1407+
"test -s $pidfile && $killcmd `cat $pidfile`",
14071408
undef,
14081409
{ 'fork' => 1, 'pidfie' => $pidfile });
14091410
&init::start_action("lookup-domain");

0 commit comments

Comments
 (0)