diff --git a/init/mass_start_stop.cgi b/init/mass_start_stop.cgi index 345d0cc72..7802fe54e 100755 --- a/init/mass_start_stop.cgi +++ b/init/mass_start_stop.cgi @@ -17,6 +17,9 @@ $disable = 1 if ($in{'delboot'} || $in{'delboot_stop'}); $restart ? $text{'mass_restart'} : $text{'mass_stop'}, ""); +# In case the action was Webmin +$SIG{'TERM'} = 'IGNORE'; + if ($start || $stop || $restart) { # Starting or stopping a bunch of actions &foreign_require("proc", "proc-lib.pl"); diff --git a/init/start_stop.cgi b/init/start_stop.cgi index fd5e57bff..6794403a4 100755 --- a/init/start_stop.cgi +++ b/init/start_stop.cgi @@ -7,6 +7,7 @@ require './init-lib.pl'; $access{'bootup'} || &error($text{'ss_ecannot'}); &ReadParse(); +# Work out the correct command, and show header $| = 1; $theme_no_header = 1; if (defined($in{'start'})) { @@ -33,10 +34,16 @@ else { &ui_print_header(undef, $text{'ss_stop'}, ""); $cmd = "$in{'file'} stop"; } + +# In case the action was Webmin +$SIG{'TERM'} = 'IGNORE'; + +# Run the command print &text('ss_exec', "$cmd"),"
\n"; print "
";
&foreign_call("proc", "safe_process_exec_logged", $cmd, 0, 0, STDOUT, undef, 1);
print "\n";
&webmin_log($in{'start'} ? 'start' : 'stop', 'action', $in{'name'});
+
&ui_print_footer($in{'back'}, $text{'edit_return'});