Scripts version 2251

This commit is contained in:
Mikhail Tergoev
2024-02-02 16:19:32 +03:00
parent 47e625d370
commit 7fd54ed79e
5 changed files with 10 additions and 4 deletions

View File

@ -610,13 +610,13 @@ pw_kill_autostart () {
sleep 5
while true ; do
if [[ -z "`ps aux | grep -m 1 "$1" | grep -v grep | awk '{print $2}'`" ]] && [[ ! -z "`ps aux | grep wrap | grep -v grep | grep -i ${portname} | head -n 1`" ]] ; then
if [[ -z "`ps aux | grep -m 1 -i "$1" | grep -v grep | awk '{print $2}'`" ]] && [[ ! -z "`ps aux | grep wrap | grep -v grep | grep -i ${portname} | head -n 1`" ]] ; then
echo -e "PID "$1" not found"
sleep "${SWAIT}"
else
sleep "${SWAIT}"
if [[ "$3" == please ]]
then kill -s SIGTERM `ps aux | grep -m 1 "$1" | grep -v grep | awk '{print $2}'`
then kill -s SIGTERM `ps aux | grep -m 1 -i "$1" | grep -v grep | awk '{print $2}'`
else kill_portwine
fi
break