diff --git a/cron_MINUTE.sh b/cron_MINUTE.sh index 4e86a4b..a4c728f 100755 --- a/cron_MINUTE.sh +++ b/cron_MINUTE.sh @@ -78,6 +78,7 @@ weeknumber=$(date +%V) # WAKEUP TIME if [[ ! -f /home/$YOU/.zen/A_Station_ON ]]; then echo "onheure=$heure; onminute=$minute; ontimebar=$timebar" > /home/$YOU/.zen/A_Station_ON + [[ -f -f /tmp/A_Station_ON ]] && cp /tmp/A_Station_ON /home/$YOU/.zen/A_Station_ON else source /home/$YOU/.zen/A_Station_ON old=$ontimebar diff --git a/zen/tools/autoPINfriends.sh b/zen/tools/autoPINfriends.sh index e0e8767..185590f 100755 --- a/zen/tools/autoPINfriends.sh +++ b/zen/tools/autoPINfriends.sh @@ -7,6 +7,9 @@ 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 + YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1); IPFSNODEID=$(ipfs id -f='\n') G1PUB=$(cat ~/.zen/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2)