can run multiple times

This commit is contained in:
fred 2021-08-06 00:31:52 +02:00
parent fdc1eab051
commit 5c1566bceb
1 changed files with 0 additions and 2 deletions

View File

@ -11,8 +11,6 @@
MY_PATH="`dirname \"$0\"`" # relative
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
ME="${0##*/}"
countMErunning=$(ps auxf --sort=+utime | grep -w $ME | grep -v -E 'color=auto|grep' | wc -l)
[[ $countMErunning -gt 2 ]] && echo "$ME already running $countMErunning time" && exit 0
source $HOME/.profile
# CORRECT PATH