Astroport.ONE/20h12.process.sh

38 lines
1.2 KiB
Bash
Raw Normal View History

#!/bin/bash
########################################################################
# Version: 0.3
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
########################################################################
MY_PATH="`dirname \"$0\"`" # relative
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
ME="${0##*/}"
2022-09-12 11:36:39 +02:00
start=`date +%s`
2022-09-23 14:57:04 +02:00
## RESTART IPFS DAEMON
# echo "$USER ALL=(ALL) NOPASSWD:/bin/systemctl" | (sudo su -c 'EDITOR="tee" visudo -f /etc/sudoers.d/systemctl')
[[ -s /etc/sudoers.d/systemctl ]] && sudo systemctl restart ipfs && sleep 5
## PROCESS TW BACKOFFICE TREATMENT
2022-09-14 14:29:19 +02:00
cd ~/.zen/Astroport.ONE/
git pull
2022-09-06 17:32:50 +02:00
~/.zen/Astroport.ONE/ASTROBOT/VOEUX.refresh.sh
~/.zen/Astroport.ONE/ASTROBOT/PLAYER.refresh.sh
2022-09-12 11:36:39 +02:00
2022-09-23 14:57:04 +02:00
## ADD A_boostrap_nodes.txt TO BOOTSTRAP
ipfs bootstrap rm --all > /dev/null 2>&1
for bootnode in $(cat ~/.zen/Astroport.ONE/A_boostrap_nodes.txt | grep -Ev "#") # remove comments
do
ipfsnodeid=${bootnode##*/}
ipfs bootstrap add $bootnode
done
2022-09-12 11:36:39 +02:00
########################################################################
end=`date +%s`
echo Execution time was `expr $end - $start` seconds.
exit 0