can run multiple times
This commit is contained in:
parent
fdc1eab051
commit
5c1566bceb
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue