From d5466612cb1430b771cdbf6ce2ca4ed0982afec2 Mon Sep 17 00:00:00 2001 From: qo-op Date: Mon, 18 May 2020 03:58:04 +0200 Subject: [PATCH] rainbow --- cron_MINUTE.sh | 36 +++++++++++++++++++++++++----------- zen/ssb_SURVEY_swarmkey.sh | 2 +- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/cron_MINUTE.sh b/cron_MINUTE.sh index 7555f87..57bff4a 100755 --- a/cron_MINUTE.sh +++ b/cron_MINUTE.sh @@ -8,19 +8,27 @@ MY_PATH="`dirname \"$0\"`" # relative MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized ME="${0##*/}" +#### + +# Add search in code "TODO". +# Write what you thing about the situation +# AND how you would like to 'fix it'... +# Then friends can read and enhance solution. # _ _____ ____ _ _______ ________ ____ # | | / / | / __ \/ | / / _/ | / / ____/ / / / # | | /| / / /| | / /_/ / |/ // // |/ / / __ / / / # | |/ |/ / ___ |/ _, _/ /| // // /| / /_/ / /_/_/ # |__/|__/_/ |_/_/ |_/_/ |_/___/_/ |_/\____/ (_|_) +######################################################################## +# NB: 'figlet' is used for labeling code trunks ######################################################################## ### MODIFY WITH GREAT CARE!!! MUST BE BUG FREE !!!!! ### EVERY STATION RUN THIS SCRIPT EVERY MINUTE. export isMinetestRunning=$(ps auxf --sort=+utime | grep -w minetest | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d ' ' -f 1) export isG1smsRunning=$(ps auxf --sort=+utime | grep -w gammu | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d ' ' -f 1) -#isNextcloudRunning=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d ' ' -f 1) -### ACTIVATE DIFFERENT FLAVOURS +# ? isNextcloudRunning=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d ' ' -f 1) +### DETECT FLAVOURS (TODO: Publish and share into ipfs/.Qm***/ ) ######################################################################## [[ ! $(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d ' ' -f 1) ]] \ && echo "ipfs daemon not running. EXIT" \ @@ -32,19 +40,19 @@ export isG1smsRunning=$(ps auxf --sort=+utime | grep -w gammu | grep -v -E 'colo export YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1); export IPFSNODEID=$(ipfs id -f='\n') - - ipfsnodeid=$(ipfs id -f='\n') g1pub=$(cat ~/.ssb/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2) -# UNIVERSAL TIME (TODO ntpdate, but sudo problem) +# UNIVERSAL TIME (TODO ntpdate, but sudo problem... +# G1Tx. G1sms. G1Dab Zen economy needs precise time sync (RpiZero !!) +# Tx rates is limited by Station time synchronisation. minute=$(date -u +%M) heure=$(date -u +%H) timebar="$heure:$minute" jourdelasemaine=$(date +%w) jourdumois=$(date +%d) numerosemaine=$(date +%V) -echo $timebar +echo $timebar | lolcat # TIME NTP SYNC: TODO: Problem being root (stickybit INSTALL?) # sudo ntpdate ntp.pool.org @@ -95,7 +103,8 @@ echo $timebar # /_ _ __/ / /_/ __/ / / / /_/ / /_ | |/ / # /_//_/ /___/\___/_/ /_/\__, /\__/ |___/ # /____/ -# SSB message 2 "youtube-dl" +# SSB message 2 "youtube-dl" EXPERIMENTAL +# TODO : Run on BIG STATIONS (Control available Disk Space !!) ################################################################## # RANDOMLY RUN SSB GET zenytv (avoid simultaneous run in swarm) randh=$((1 + RANDOM % 24)) @@ -115,8 +124,11 @@ randh=$((1 + RANDOM % 24)) ################################################################## # MIDNIGHT:01 : ZENBOT CLEANING & UPDATE if [[ "$timebar" == "00:01" ]]; then - sleep $((1 + RANDOM % 10)) - + sleep $((1 + RANDOM % 10)) ### Be careful if random sleep is not activated... + ############################## That swarm could become an aggressive blob !! + ### PEACE & LOVE software is processing... We are HyperWeb people here. + # DEFCON 5 code runin' please keep cool, take care and be zen + # UPGRADE youtube-dl youtube-dl --rm-cache-dir youtube-dl -U @@ -144,9 +156,11 @@ fi # ___/ / /_/ /_/ / / / /_/ / /_/ / __/ / / / / /_/ /> < # /____/\__/\____/_/ \__,_/\__, /\___/ /_/ /_/\__,_/_/|_| # /____/ -# Always 1/2 HDD for IPFS size - dicotomic adaptation -# UPDATE ON 7th EVERY MONTH +# 1/2 HDD for IPFS size - dicotomic adaptation 7th EVERY MONTH +# +# TODO: Read parameters from ipfs, publish status to swarm, could be use for youtube-dl or other kind of heavy ipfs input Station election. # + if [[ $jourdumois == 7 ]]; then availableDiskSize=$(df -P ~/ | awk 'NR>1{sum+=$4}END{print sum}') diskSize="$((availableDiskSize / 2))" diff --git a/zen/ssb_SURVEY_swarmkey.sh b/zen/ssb_SURVEY_swarmkey.sh index 466ace1..7587ff4 100755 --- a/zen/ssb_SURVEY_swarmkey.sh +++ b/zen/ssb_SURVEY_swarmkey.sh @@ -16,7 +16,7 @@ echo ' # ex: ./'$ME' # SURVEY received #astroport-swarmkey ipfs_swarm.key.crypt for IPFS ######################################################################## - +___DESACTIVATED___ TODO testing. __ __ _ _ (_ (_ |_) _ ._ _ _|_o| __)__)|_) _>|_||\/(/_\/ | ||(/__>