mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Fix stop script degeneration to try all kill commands
https://sourceforge.net/p/webadmin/bugs/5609/
This commit is contained in:
4
setup.pl
4
setup.pl
@@ -616,12 +616,12 @@ else {
|
||||
print STOP " touch $var_dir/stop-flag\n";
|
||||
print STOP " if [ \"\$1\" = \"--kill\" ]; then\n";
|
||||
print STOP " sleep 1\n";
|
||||
print STOP " ((ps axf | grep \"$wadir\\\/miniserv\\.pl\" | awk '{print \"kill -9 -- -\" \$1}' | bash) || kill -9 -- -\$pid || kill -9 \$pid) 2>/dev/null\n";
|
||||
print STOP " (ps axf | grep \"$wadir\\\/miniserv\\.pl\" | awk '{print \"kill -9 -- -\" \$1}' | bash ; kill -9 -- -\$pid ; kill -9 \$pid) 2>/dev/null\n";
|
||||
print STOP " fi\n";
|
||||
print STOP " exit 0\n";
|
||||
print STOP "else\n";
|
||||
print STOP " if [ \"\$1\" = \"--kill\" ]; then\n";
|
||||
print STOP " (ps axf | grep \"$wadir\\\/miniserv\\.pl\" | awk '{print \"kill -9 -- -\" \$1}' | bash) 2>/dev/null\n";
|
||||
print STOP " (ps axf | grep \"$wadir\\\/miniserv\\.pl\" | awk '{print \"kill -9 -- -\" \$1}' | bash ; kill -9 -- -\$pid ; kill -9 \$pid) 2>/dev/null\n";
|
||||
print STOP " fi\n";
|
||||
print STOP "fi\n";
|
||||
close(STOP);
|
||||
|
||||
4
setup.sh
4
setup.sh
@@ -695,12 +695,12 @@ echo " kill \$pid || exit 1" >>$config_dir/.stop-init
|
||||
echo " touch $var_dir/stop-flag" >>$config_dir/.stop-init
|
||||
echo " if [ \"\$1\" = \"--kill\" ]; then" >>$config_dir/.stop-init
|
||||
echo " sleep 1" >>$config_dir/.stop-init
|
||||
echo " ((ps axf | grep \"$wadir\/miniserv\.pl\" | awk '{print \"kill -9 -- -\" \$1}' | bash) || kill -9 -- -\$pid || kill -9 \$pid) 2>/dev/null" >>$config_dir/.stop-init
|
||||
echo " (ps axf | grep \"$wadir\/miniserv\.pl\" | awk '{print \"kill -9 -- -\" \$1}' | bash ; kill -9 -- -\$pid ; kill -9 \$pid) 2>/dev/null" >>$config_dir/.stop-init
|
||||
echo " fi" >>$config_dir/.stop-init
|
||||
echo " exit 0" >>$config_dir/.stop-init
|
||||
echo "else" >>$config_dir/.stop-init
|
||||
echo " if [ \"\$1\" = \"--kill\" ]; then" >>$config_dir/.stop-init
|
||||
echo " (ps axf | grep \"$wadir\/miniserv\.pl\" | awk '{print \"kill -9 -- -\" \$1}' | bash) 2>/dev/null" >>$config_dir/.stop-init
|
||||
echo " (ps axf | grep \"$wadir\/miniserv\.pl\" | awk '{print \"kill -9 -- -\" \$1}' | bash ; kill -9 -- -\$pid ; kill -9 \$pid) 2>/dev/null" >>$config_dir/.stop-init
|
||||
echo " fi" >>$config_dir/.stop-init
|
||||
echo "fi" >>$config_dir/.stop-init
|
||||
# Restart main
|
||||
|
||||
Reference in New Issue
Block a user