diff --git a/cron_MINUTE.sh b/cron_MINUTE.sh index 554f393..b136052 100755 --- a/cron_MINUTE.sh +++ b/cron_MINUTE.sh @@ -77,11 +77,11 @@ dayofthemonth=$(date +%d) 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 /tmp/A_Station_ON ]] && cp /tmp/A_Station_ON /home/$YOU/.zen/A_Station_ON +if [[ ! -f /tmp/A_Station_ON ]]; then + echo "onheure=$heure; onminute=$minute; ontimebar=$timebar" > /tmp/A_Station_ON + [[ -f /home/$YOU/.zen/A_Station_ON ]] && cp /home/$YOU/.zen/A_Station_ON /tmp/A_Station_ON && rm /home/$YOU/.zen/A_Station_ON else - source /home/$YOU/.zen/A_Station_ON + source /tmp/A_Station_ON old=$ontimebar new=$timebar # feeding variables by using read and splitting with IFS @@ -187,10 +187,10 @@ fi # ################################################################## # TODO: IDEA make gchange/ipfs/ipns refresh speed depending on ipfs swarm size and DEFCON level ! -## SYNC GCHANGE EVERY 2 hours runtime -[[ $(($runtime % 122)) == 0 || "$runtime" == "1" ]] && $MY_PATH/zen/gchange_INIT.sh 2>&1 > /home/${YOU}/.zen/ipfs/.${IPFSNODEID}/.log.gchange_INIT.txt -## SYNC SWARM EVERY 17 mn runtime -[[ $(($runtime % 17)) == 0 ]] && $MY_PATH/zen/gchange_IPFS_swarm.sh 2>&1 > /home/${YOU}/.zen/ipfs/.${IPFSNODEID}/.log.gchange_IPFS_swarm.txt +## SYNC GCHANGE EVERY 6 hours runtime +[[ $(($runtime % 360)) == 0 || "$runtime" == "1" ]] && $MY_PATH/zen/gchange_INIT.sh 2>&1 > /home/${YOU}/.zen/ipfs/.${IPFSNODEID}/.log.gchange_INIT.txt +## SYNC SWARM EVERY 720 mn runtime +[[ $(($runtime % 720)) == 0 || "$runtime" == "5" ]] && $MY_PATH/zen/gchange_IPFS_swarm.sh 2>&1 > /home/${YOU}/.zen/ipfs/.${IPFSNODEID}/.log.gchange_IPFS_swarm.txt # QUICK SYNC SWARM EVERY 11 minutes [[ $(($runtime % 11)) == 0 ]] && $MY_PATH/zen/ipfs_FRIENDS_refresh.sh 2>&1 > /home/${YOU}/.zen/ipfs/.${IPFSNODEID}/.log.ipfs_FRIENDS_refresh.txt ## TODO ACTIVATE/DESACTIVATE LOG @@ -244,7 +244,7 @@ fi # 5 mn / 24h REBOOT & MIDNIGHT:01 : CLEANING & UPDATE ################################################################## ################################################################## -if [[ "$timebar" == "00:01" || "$runtime" == "5" || $(($runtime % 1380)) == 0 ]]; then +if [[ "$timebar" == "00:01" || "$runtime" == "12" || $(($runtime % 1380)) == 0 ]]; then echo ' # ____ ____ ____ ___ # / __ \/ __ \ _ / __ < /