forked from axiom-team/astrXbian
can run multiple times
This commit is contained in:
parent
fdc1eab051
commit
5c1566bceb
@ -11,8 +11,6 @@
|
|||||||
MY_PATH="`dirname \"$0\"`" # relative
|
MY_PATH="`dirname \"$0\"`" # relative
|
||||||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||||
ME="${0##*/}"
|
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
|
source $HOME/.profile
|
||||||
# CORRECT PATH
|
# CORRECT PATH
|
||||||
|
Loading…
Reference in New Issue
Block a user