don't use PGID to do clean up

This commit is contained in:
garywill
2021-11-20 20:32:38 +08:00
parent 15a2e0ce53
commit f8cbf5eded
2 changed files with 11 additions and 11 deletions

10
lnxrouter Executable file → Normal file
View File

@@ -1158,7 +1158,7 @@ _cleanup() {
}
clean_iptables() {
bash $CONFDIR/undo_iptables.sh
[[ -f $CONFDIR/undo_iptables.sh ]] && bash $CONFDIR/undo_iptables.sh
[[ -f $CONFDIR/undo_iptables_2.sh ]] && bash $CONFDIR/undo_iptables_2.sh
}
@@ -1173,10 +1173,10 @@ cleanup() {
clean_iptables > /dev/null
_cleanup 2> /dev/null
pgid=$(ps opgid= $$ |awk '{print $1}' )
echo "Killing PGID $pgid ..."
kill -15 -$pgid
sleep 1
#pgid=$(ps opgid= $$ |awk '{print $1}' )
#echo "Killing PGID $pgid ..."
#kill -15 -$pgid
#sleep 1
echo "Cleaning up done"
#kill -9 -$pgid
}