From 6a68cc8149772568d762844f0b46ab774037deb2 Mon Sep 17 00:00:00 2001 From: iliajie Date: Sun, 3 Jul 2022 00:03:55 +0300 Subject: [PATCH] Add `kill` command fall-back (just in case) --- init/atboot.pl | 2 +- init/updateboot.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/init/atboot.pl b/init/atboot.pl index 22c2d1583..eebcbb816 100755 --- a/init/atboot.pl +++ b/init/atboot.pl @@ -8,7 +8,7 @@ $product = $ARGV[0] || "webmin"; $ucproduct = ucfirst($product); $< == 0 || die "atboot.pl must be run as root"; -my $kill = &has_command("kill"); +my $kill = &has_command("kill") || '/bin/kill'; if ($init_mode eq "osx") { # Darwin System diff --git a/init/updateboot.pl b/init/updateboot.pl index ee76a3d59..08d8af894 100755 --- a/init/updateboot.pl +++ b/init/updateboot.pl @@ -21,7 +21,7 @@ if ($product) { unlink("$p/$product"); } my $temp = &transname(); - my $killcmd = &has_command('kill'); + my $killcmd = &has_command('kill') || '/bin/kill'; $ENV{'WEBMIN_KILLCMD'} = $killcmd; ©_source_dest("$root_directory/webmin-systemd", "$temp"); my $lref = &read_file_lines($temp);