forked from STI/Astroport.ONE
---- SWARM COMMUNICATION BROKEN / RESTARTING IPFS DAEMON ----
This commit is contained in:
parent
4d784941bc
commit
69731ff435
@ -16,7 +16,13 @@ LOWMODE=$(sudo systemctl status ipfs | grep disabled) ## IPFS DISABLED - START O
|
|||||||
[[ ! $isLAN ]] && LOWMODE="" ## LOWMODE ONLY FOR LAN STATION
|
[[ ! $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')
|
# 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
|
floop=0
|
||||||
while [[ ! $(netstat -tan | grep 5001 | grep LISTEN) ]]; do
|
while [[ ! $(netstat -tan | grep 5001 | grep LISTEN) ]]; do
|
||||||
@ -120,7 +126,7 @@ if [[ ! -f /etc/systemd/system/astroport.service ]]; then
|
|||||||
PID=$!
|
PID=$!
|
||||||
echo $PID > ~/.zen/.pid
|
echo $PID > ~/.zen/.pid
|
||||||
else
|
else
|
||||||
sudo systemctl restart astroport
|
sudo systemctl start astroport
|
||||||
[[ -s ~/.zen/G1BILLET/G1BILLETS.sh ]] && sudo systemctl restart g1billet
|
[[ -s ~/.zen/G1BILLET/G1BILLETS.sh ]] && sudo systemctl restart g1billet
|
||||||
echo "Astroport processes systemd restart"
|
echo "Astroport processes systemd restart"
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ while true; do
|
|||||||
## CHECK IF IPFS NODE IS RESPONDING
|
## CHECK IF IPFS NODE IS RESPONDING
|
||||||
ipfs --timeout=30s swarm peers
|
ipfs --timeout=30s swarm peers
|
||||||
[[ $? != 0 ]] \
|
[[ $? != 0 ]] \
|
||||||
&& echo "---- SWARM COMUNICATION BROKEN / RESTARTING IPFS DAEMON ----" \
|
&& echo "---- SWARM COMMUNICATION BROKEN / RESTARTING IPFS DAEMON ----" \
|
||||||
&& sudo systemctl restart ipfs \
|
&& sudo systemctl restart ipfs \
|
||||||
&& sleep 30
|
&& sleep 30
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user