forked from axiom-team/astrXbian
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
This commit is contained in:
parent
7014112c36
commit
f6016825d7
|
@ -52,7 +52,7 @@ large=$((width-300))
|
|||
haut=$((height-200))
|
||||
|
||||
########################################################################
|
||||
IPFSNODEID=$(ipfs --timeout=20s id -f='<id>\n')
|
||||
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
|
||||
[[ -f ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.gchange_title ]] && XGUID="$(cat ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.gchange_title)" || XGUID="$(cat /etc/hostname)"
|
||||
[[ -f ~/.zen/ipfs/.$IPFSNODEID/_xbian.zuid ]] && XZUID=$(cat ~/.zen/ipfs/.$IPFSNODEID/_xbian.zuid)
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ source $HOME/.profile
|
|||
|
||||
#### CONTROL STATION IPFS DAEMON
|
||||
## timeout is fixing ipfs minimum response time, before considering stuck process
|
||||
IPFSNODEID=$(ipfs --timeout=20s id -f='<id>\n')
|
||||
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
|
||||
howmany=$(cat /tmp/ipfs.timeout)
|
||||
if [[ ! $IPFSNODEID ]]; then
|
||||
## wait a howmany timeout before restarting ipfs
|
||||
|
|
|
@ -9,7 +9,7 @@ MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
|||
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
|
||||
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=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
|
||||
[[ -f ~/.zen/ipfs/.$IPFSNODEID/_xbian.zuid ]] && AXID=$(cat ~/.zen/ipfs/.$IPFSNODEID/_xbian.zuid);
|
||||
[[ -f ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.gchange_title ]] && XZUID=$(cat ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.gchange_title)
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
|||
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
|
||||
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=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
|
||||
|
||||
########################################################################
|
||||
# SCAN AND MANAGE KEYS BETWEEN MOVIES & FRIENDS
|
||||
|
|
|
@ -19,7 +19,7 @@ start=`date +%s`
|
|||
# INITIALISATION & CONTROL
|
||||
########################################################################
|
||||
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1);
|
||||
IPFSNODEID=$(ipfs --timeout=20s id -f='<id>\n')
|
||||
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
|
||||
[[ ! $IPFSNODEID ]] && echo 'ERROR missing IPFS Node id !! IPFS is not installed !?' && exit 1
|
||||
|
||||
########################################################################
|
||||
|
|
|
@ -13,7 +13,7 @@ start=`date +%s`
|
|||
|
||||
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
|
||||
IPFSNODEID=$(ipfs --timeout=20s id -f='<id>\n')
|
||||
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
|
||||
[[ ! $IPFSNODEID ]] && echo 'ERROR missing IPFS Node id !! IPFS is not installed !?' && exit 1
|
||||
|
||||
# CLEAN "A_my_swarm.txt" and "A_swarm_map.txt"
|
||||
|
|
|
@ -13,7 +13,7 @@ start=`date +%s`
|
|||
|
||||
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
|
||||
IPFSNODEID=$(ipfs --timeout=20s id -f='<id>\n')
|
||||
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
|
||||
[[ ! $IPFSNODEID ]] && echo 'ERROR missing IPFS Node id !! IPFS is not installed !?' && exit 1
|
||||
########################################################################
|
||||
########################################################################
|
||||
|
|
|
@ -9,7 +9,7 @@ MY_PATH="`dirname \"$0\"`" # relative
|
|||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||
########################################################################
|
||||
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) || er+=" ipfs daemon not running"
|
||||
IPFSNODEID=$(ipfs --timeout=5s id -f='<id>\n') || er+=" ipfs id problem"
|
||||
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID) || er+=" ipfs id problem"
|
||||
[[ "$YOU" == "" || "$IPFSNODEID" == "" ]] && echo "ERROR : $er " && exit 1
|
||||
########################################################################
|
||||
# TODO ESTABLISH A PORT FORWARD STRATEGY (depending on Node Flavour)
|
||||
|
|
|
@ -13,7 +13,7 @@ start=`date +%s`
|
|||
|
||||
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
|
||||
IPFSNODEID=$(ipfs --timeout=20s id -f='<id>\n')
|
||||
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
|
||||
[[ ! $IPFSNODEID ]] && echo 'ERROR missing IPFS Node id !! IPFS is not installed !?' && exit 1
|
||||
########################################################################
|
||||
########################################################################
|
||||
|
|
|
@ -20,7 +20,7 @@ countMErunning=$(ps auxf --sort=+utime | grep -w $ME | grep -v -E 'color=auto|gr
|
|||
|
||||
########################################################################
|
||||
########################################################################
|
||||
IPFSNODEID=$(ipfs --timeout=20s id -f='<id>\n')
|
||||
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
|
||||
[[ ! $IPFSNODEID ]] && echo 'ERROR missing IPFS Node id !! IPFS is not installed !?' && exit 1
|
||||
########################################################################
|
||||
[[ ! -f ~/.zen/secret.dunikey ]] && exit 1
|
||||
|
|
|
@ -6,7 +6,7 @@ ME="${0##*/}"
|
|||
countMErunning=$(ps auxf --sort=+utime | grep -w $ME | grep -v -E 'color=auto|grep' | wc -l)
|
||||
[[ $countMErunning -gt 2 ]] && echo "$ME already running $countMErunning time" && exit 0
|
||||
########################################################################
|
||||
IPFSNODEID=$(ipfs --timeout=20s id -f='<id>\n')
|
||||
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
|
||||
[[ $IPFSNODEID == "" ]] && echo "ipfs TIMEOUT" && exit 1
|
||||
|
||||
########################################################################
|
||||
|
|
|
@ -15,7 +15,7 @@ countMErunning=$(ps auxf --sort=+utime | grep -w $ME | grep -v -E 'color=auto|gr
|
|||
start=`date +%s`
|
||||
|
||||
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1);
|
||||
IPFSNODEID=$(ipfs --timeout=20s id -f='<id>\n')
|
||||
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
|
||||
[[ ! $IPFSNODEID ]] && echo 'ERROR missing IPFS Node id !! IPFS is not responding !?' && exit 1
|
||||
G1PUB=$(cat ~/.zen/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2)
|
||||
# ~/.zen/ipfs/.${IPFSNODEID}/astroport/kodi/vstream/${PREFIX}ASTRXBIAN
|
||||
|
|
|
@ -9,7 +9,7 @@ MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
|||
ME="${0##*/}"
|
||||
|
||||
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1);
|
||||
IPFSNODEID=$(ipfs id -f='<id>\n')
|
||||
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
|
||||
|
||||
myIP=$(hostname -I | awk '{print $1}' | head -n 1)
|
||||
IamInLAN=$(echo $myIP | grep -E "(^127\.)|(^192\.168\.)|(^fd42\:)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/" )
|
||||
|
|
Loading…
Reference in New Issue