forked from axiom-team/astrXbian
ipfs id timeout 20s
This commit is contained in:
parent
c0ab229794
commit
7002c6f76a
@ -19,8 +19,8 @@ countMErunning=$(ps auxf --sort=+utime | grep -w $ME | grep -v -E 'color=auto|gr
|
|||||||
# INITIALISATION & CONTROL
|
# INITIALISATION & CONTROL
|
||||||
########################################################################
|
########################################################################
|
||||||
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1);
|
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1);
|
||||||
IPFSNODEID=$(ipfs --timeout=5s id -f='<id>\n')
|
IPFSNODEID=$(ipfs --timeout=20s id -f='<id>\n') || echo 'ERROR missing IPFS Node id !! IPFS is not installed !?' && exit 1
|
||||||
[[ $IPFSNODEID == "" ]] && echo "ERROR missing IPFS Node id !! EXIT" && exit 1
|
|
||||||
########################################################################
|
########################################################################
|
||||||
[[ ! -f ~/.zen/secret.dunikey ]] && echo "Missing ~/.zen/secret.dunikey. EXIT" && exit 1
|
[[ ! -f ~/.zen/secret.dunikey ]] && echo "Missing ~/.zen/secret.dunikey. EXIT" && exit 1
|
||||||
G1PUB=$(cat ~/.zen/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2)
|
G1PUB=$(cat ~/.zen/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2)
|
||||||
|
@ -12,7 +12,7 @@ countMErunning=$(ps auxf --sort=+utime | grep -w $ME | grep -v -E 'color=auto|gr
|
|||||||
|
|
||||||
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) && [[ ! $YOU ]] && echo "ipfs NOT RUNNING. EXIT" && exit 1
|
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) && [[ ! $YOU ]] && echo "ipfs NOT RUNNING. EXIT" && exit 1
|
||||||
G1PUB=$(cat ~/.zen/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2) && [[ ! $G1PUB ]] && echo "ERREUR G1PUB. EXIT" && exit 1
|
G1PUB=$(cat ~/.zen/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2) && [[ ! $G1PUB ]] && echo "ERREUR G1PUB. EXIT" && exit 1
|
||||||
IPFSNODEID=$(ipfs --timeout=5s id -f='<id>\n') && [[ "$IPFSNODEID" == "" ]] && echo 'ERROR missing IPFS Node id !! IPFS is not installed !?' && exit 1
|
IPFSNODEID=$(ipfs --timeout=20s id -f='<id>\n') || echo 'ERROR missing IPFS Node id !! IPFS is not installed !?' && exit 1
|
||||||
|
|
||||||
# CLEAN "A_my_swarm.txt" and "A_swarm_map.txt"
|
# CLEAN "A_my_swarm.txt" and "A_swarm_map.txt"
|
||||||
if [[ $(cat ~/.zen/A_swarm_map.txt | wc -l) -gt 300 ]]; then
|
if [[ $(cat ~/.zen/A_swarm_map.txt | wc -l) -gt 300 ]]; then
|
||||||
|
@ -10,7 +10,7 @@ ME="${0##*/}"
|
|||||||
|
|
||||||
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) && [[ ! $YOU ]] && echo "ipfs NOT RUNNING. EXIT" && exit 1
|
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) && [[ ! $YOU ]] && echo "ipfs NOT RUNNING. EXIT" && exit 1
|
||||||
G1PUB=$(cat ~/.zen/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2) && [[ ! $G1PUB ]] && echo "ERREUR G1PUB. EXIT" && exit 1
|
G1PUB=$(cat ~/.zen/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2) && [[ ! $G1PUB ]] && echo "ERREUR G1PUB. EXIT" && exit 1
|
||||||
IPFSNODEID=$(ipfs --timeout=5s id -f='<id>\n') || echo 'ERROR missing IPFS Node id !! IPFS is not installed !?' && exit 1
|
IPFSNODEID=$(ipfs --timeout=20s id -f='<id>\n') || echo 'ERROR missing IPFS Node id !! IPFS is not installed !?' && exit 1
|
||||||
########################################################################
|
########################################################################
|
||||||
########################################################################
|
########################################################################
|
||||||
# This script is controling IPFS swarm
|
# This script is controling IPFS swarm
|
||||||
|
@ -12,7 +12,7 @@ countMErunning=$(ps auxf --sort=+utime | grep -w $ME | grep -v -E 'color=auto|gr
|
|||||||
|
|
||||||
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) && [[ ! $YOU ]] && echo "ipfs NOT RUNNING. EXIT" && exit 1
|
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) && [[ ! $YOU ]] && echo "ipfs NOT RUNNING. EXIT" && exit 1
|
||||||
G1PUB=$(cat ~/.zen/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2) && [[ ! $G1PUB ]] && echo "ERREUR G1PUB. EXIT" && exit 1
|
G1PUB=$(cat ~/.zen/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2) && [[ ! $G1PUB ]] && echo "ERREUR G1PUB. EXIT" && exit 1
|
||||||
IPFSNODEID=$(ipfs --timeout=5s id -f='<id>\n') && [[ "$IPFSNODEID" == "" ]] && echo 'ERROR missing IPFS Node id !! IPFS is not installed !?' && exit 1
|
IPFSNODEID=$(ipfs --timeout=20s id -f='<id>\n') || echo 'ERROR missing IPFS Node id !! IPFS is not installed !?' && exit 1
|
||||||
########################################################################
|
########################################################################
|
||||||
########################################################################
|
########################################################################
|
||||||
# This script is controling IPFS swarm
|
# This script is controling IPFS swarm
|
||||||
|
@ -9,7 +9,7 @@ MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
|||||||
ME="${0##*/}"
|
ME="${0##*/}"
|
||||||
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) && [[ ! $YOU ]] && echo "ipfs NOT RUNNING. EXIT" && exit 1
|
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) && [[ ! $YOU ]] && echo "ipfs NOT RUNNING. EXIT" && exit 1
|
||||||
G1PUB=$(cat ~/.zen/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2) && [[ ! $G1PUB ]] && echo "ERREUR G1PUB. EXIT" && exit 1
|
G1PUB=$(cat ~/.zen/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2) && [[ ! $G1PUB ]] && echo "ERREUR G1PUB. EXIT" && exit 1
|
||||||
IPFSNODEID=$(ipfs id -f='<id>\n') && [[ "$IPFSNODEID" == "" ]] && echo 'ERROR missing IPFS Node id !! IPFS is not installed !?' && exit 1
|
IPFSNODEID=$(ipfs --timeout=20s id -f='<id>\n') || echo 'ERROR missing IPFS Node id !! IPFS is not installed !?' && exit 1
|
||||||
########################################################################
|
########################################################################
|
||||||
########################################################################
|
########################################################################
|
||||||
# This script is refreshing all IPFS swarm to .mycode UNITY
|
# This script is refreshing all IPFS swarm to .mycode UNITY
|
||||||
|
@ -20,8 +20,8 @@ ME="${0##*/}"
|
|||||||
########################################################################
|
########################################################################
|
||||||
# ENVIRONEMENT DETECTION + IPFS ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_info
|
# ENVIRONEMENT DETECTION + IPFS ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_info
|
||||||
########################################################################
|
########################################################################
|
||||||
IPFSNODEID=$(ipfs --timeout=5s id -f='<id>\n')
|
IPFSNODEID=$(ipfs --timeout=20s id -f='<id>\n') || echo 'ERROR missing IPFS Node id !! IPFS is not installed !?' && exit 1
|
||||||
[[ $IPFSNODEID == "" ]] && echo "ERROR missing IPFS Node id !! IPFS is not installed !?" && exit 1
|
|
||||||
########################################################################
|
########################################################################
|
||||||
[[ ! -f ~/.zen/secret.dunikey ]] && exit 1
|
[[ ! -f ~/.zen/secret.dunikey ]] && exit 1
|
||||||
G1PUB=$(cat ~/.zen/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2)
|
G1PUB=$(cat ~/.zen/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2)
|
||||||
|
Loading…
Reference in New Issue
Block a user