diff --git a/20h12.process.sh b/20h12.process.sh index c10183ca..2a4e91df 100755 --- a/20h12.process.sh +++ b/20h12.process.sh @@ -16,7 +16,13 @@ LOWMODE=$(sudo systemctl status ipfs | grep disabled) ## IPFS DISABLED - START O [[ ! $isLAN ]] && LOWMODE="" ## LOWMODE ONLY FOR LAN STATION # echo "$USER ALL=(ALL) NOPASSWD:/bin/systemctl" | (sudo su -c 'EDITOR="tee" visudo -f /etc/sudoers.d/systemctl') -sudo systemctl restart ipfs && sleep 10 +sudo systemctl stop astroport +## CHECK IF IPFS NODE IS RESPONDING +ipfs --timeout=30s swarm peers +[[ $? != 0 ]] \ + && echo "---- SWARM COMMUNICATION BROKEN / RESTARTING IPFS DAEMON ----" \ + && sudo systemctl restart ipfs \ + && sleep 30 floop=0 while [[ ! $(netstat -tan | grep 5001 | grep LISTEN) ]]; do @@ -120,7 +126,7 @@ if [[ ! -f /etc/systemd/system/astroport.service ]]; then PID=$! echo $PID > ~/.zen/.pid else - sudo systemctl restart astroport + sudo systemctl start astroport [[ -s ~/.zen/G1BILLET/G1BILLETS.sh ]] && sudo systemctl restart g1billet echo "Astroport processes systemd restart" diff --git a/_12345.sh b/_12345.sh index d84f6023..eb869b2e 100755 --- a/_12345.sh +++ b/_12345.sh @@ -88,7 +88,7 @@ while true; do ## CHECK IF IPFS NODE IS RESPONDING ipfs --timeout=30s swarm peers [[ $? != 0 ]] \ - && echo "---- SWARM COMUNICATION BROKEN / RESTARTING IPFS DAEMON ----" \ + && echo "---- SWARM COMMUNICATION BROKEN / RESTARTING IPFS DAEMON ----" \ && sudo systemctl restart ipfs \ && sleep 30