---- SWARM COMMUNICATION BROKEN / RESTARTING IPFS DAEMON ----

This commit is contained in:
fred 2024-03-02 22:11:33 +01:00
parent 4d784941bc
commit 69731ff435
2 changed files with 9 additions and 3 deletions

View File

@ -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"

View File

@ -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