mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Don't allow stopping webmin to kill itself 0https://github.com/webmin/webmin/issues/1228
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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'});
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user