mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Fix addition of --nofork arg
This commit is contained in:
@@ -9,6 +9,7 @@ use Time::Local;
|
||||
eval "use Time::HiRes;";
|
||||
|
||||
@itoa64 = split(//, "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz");
|
||||
@miniserv_argv = @ARGV;
|
||||
|
||||
# Find and read config file
|
||||
if ($ARGV[0] eq "--nofork") {
|
||||
@@ -113,7 +114,6 @@ if (!-x $perl_path) {
|
||||
if (-l $perl_path) {
|
||||
$linked_perl_path = readlink($perl_path);
|
||||
}
|
||||
@miniserv_argv = @ARGV;
|
||||
|
||||
# Check vital config options
|
||||
&update_vital_config();
|
||||
@@ -3108,7 +3108,7 @@ dbmclose(%sessiondb);
|
||||
kill('KILL', $logclearer) if ($logclearer);
|
||||
kill('KILL', $extauth) if ($extauth);
|
||||
if (&indexof("--nofork", @miniserv_argv) < 0) {
|
||||
push(@miniserv_argv, "--nofork");
|
||||
unshift(@miniserv_argv, "--nofork");
|
||||
}
|
||||
exec($perl_path, $miniserv_path, @miniserv_argv);
|
||||
die "Failed to restart miniserv with $perl_path $miniserv_path";
|
||||
|
||||
Reference in New Issue
Block a user