mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-06-22 19:34:41 +00:00
make kill inotify optional on shutdown
This commit is contained in:
parent
ac9ca6049e
commit
b1d569a679
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# description: Start or stop telegram-bash-bot
|
# description: Start or stop telegram-bash-bot
|
||||||
#
|
#
|
||||||
#### $$VERSION$$ v0.94-pre-0-gac2ec02
|
#### $$VERSION$$ v0.94-pre-11-gac9ca60
|
||||||
# shellcheck disable=SC2009
|
# shellcheck disable=SC2009
|
||||||
# shellcheck disable=SC2181
|
# shellcheck disable=SC2181
|
||||||
|
|
||||||
|
@ -76,8 +76,9 @@ case "$1" in
|
||||||
'suspendback'|'resumeback'|'killback')
|
'suspendback'|'resumeback'|'killback')
|
||||||
$runcmd "$start $1"
|
$runcmd "$start $1"
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
# kill inotifywait from runuser
|
# kill inotifywait from runuser if long running bg scripts use it
|
||||||
if [ "$1" != "resumeback" ]; then
|
KILLINOTIFY=""
|
||||||
|
if [ "$1" != "resumeback" ] && [ -n "${KILLINOTIFY}" ]; then
|
||||||
kill -9 "$(ps -u "$runas" | grep inotifywait | sed 's/ .*//')" >/dev/null 2>&1
|
kill -9 "$(ps -u "$runas" | grep inotifywait | sed 's/ .*//')" >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user