diff --git a/sms_send_tosend.sh b/sms_send_tosend.sh index be267cd..56d3d8e 100755 --- a/sms_send_tosend.sh +++ b/sms_send_tosend.sh @@ -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