Don't allow stopping webmin to kill itself 0https://github.com/webmin/webmin/issues/1228

This commit is contained in:
Jamie Cameron
2020-04-11 19:44:29 -07:00
parent 6902a470b1
commit 1758f34318
6 changed files with 6 additions and 4 deletions

View File

@@ -17,6 +17,7 @@ $disable = 1 if ($in{'delboot'} || $in{'delboot_stop'});
if ($start || $stop || $restart) {
# Starting or stopping a bunch of services
$SIG{'TERM'} = 'ignore'; # Restarting webmin may kill this script
$access{'bootup'} || &error($text{'ss_ecannot'});
foreach $s (@sel) {
if ($start) {

View File

@@ -16,6 +16,7 @@ $disable = 1 if ($in{'delboot'} || $in{'delboot_stop'});
if ($start || $stop) {
# Starting or stopping a bunch of services
$SIG{'TERM'} = 'ignore'; # Restarting webmin may kill this script
$access{'bootup'} || &error($text{'ss_ecannot'});
foreach $s (@sel) {
if ($start) {

View File

@@ -17,11 +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
$SIG{'TERM'} = 'ignore'; # Restarting webmin may kill this script
&foreign_require("proc", "proc-lib.pl");
$access{'bootup'} || &error($text{'ss_ecannot'});

View File

@@ -17,6 +17,7 @@ $disable = 1 if ($in{'delboot'} || $in{'delboot_stop'});
if ($start || $stop || $restart) {
# Starting or stopping a bunch of services
$SIG{'TERM'} = 'ignore'; # Restarting webmin may kill this script
$access{'bootup'} || &error($text{'ss_ecannot'});
foreach $s (@sel) {
if ($start) {

View File

@@ -17,6 +17,7 @@ $disable = 1 if ($in{'delboot'} || $in{'delboot_stop'});
if ($start || $stop || $restart) {
# Starting or stopping a bunch of services
$SIG{'TERM'} = 'ignore'; # Restarting webmin may kill this script
$access{'bootup'} || &error($text{'ss_ecannot'});
foreach $s (@sel) {
if ($start) {

View File

@@ -20,7 +20,7 @@ $action ||= 'stop';
$cmd = $in{'file'}." ".$action;
# In case the action was Webmin
$SIG{'TERM'} = sub { };
$SIG{'TERM'} = 'ignore';
# Run the command
print &text('ss_exec', "<tt>$cmd</tt>"),"<p>\n";