cannot run multiple time simultaneously
parent
e24b4ed75e
commit
dba2255cd1
|
@ -11,6 +11,10 @@ YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail
|
|||
[[ ! -f /home/${YOU}/.zen/secret.dunikey ]] && echo "Crypto is missing... please install 'astrXbian' TestNet" && exit 1
|
||||
G1PUB=$(cat /home/${YOU}/.zen/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2)
|
||||
|
||||
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. EXIT." && exit 0
|
||||
|
||||
## STOP GAMMU-SMSD
|
||||
sudo service gammu-smsd stop
|
||||
|
||||
|
|
Loading…
Reference in New Issue