myIP=$(hostname -I | awk '{print $1}' | head -n 1)
isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/") [[ ! $myIP || $isLAN ]] && myIP="127.0.1.1"
This commit is contained in:
parent
b5f7d84ea5
commit
892f215a93
|
@ -63,7 +63,10 @@ echo
|
|||
[[ -s ~/.zen/tmp/$VOEUNS.html ]] && echo "HEY !!! UN TW EXISTE POUR CE VOEU ! ~/.zen/tmp/$VOEUNS.html - EXIT -" && exit 1
|
||||
|
||||
# CRYPTO BUG. TODO use natools to protect and share key with Ŋ1 only ;)
|
||||
myIP=$(hostname -I | awk '{print $1}' | head -n 1)
|
||||
myIP=$(hostname -I | awk '{print $1}' | head -n 1)
|
||||
isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
|
||||
[[ ! $myIP || $isLAN ]] && myIP="127.0.1.1"
|
||||
|
||||
echo " Passerelle : $myIP"
|
||||
|
||||
echo "# UPGRADING WORLD WHISHKEY DATABASE"
|
||||
|
|
|
@ -40,7 +40,9 @@ for PLAYER in $(ls -t ~/.zen/game/players/); do
|
|||
rm -Rf ~/.zen/tmp/${PLAYER}
|
||||
mkdir -p ~/.zen/tmp/${PLAYER}
|
||||
|
||||
myIP=$(hostname -I | awk '{print $1}' | head -n 1)
|
||||
myIP=$(hostname -I | awk '{print $1}' | head -n 1)
|
||||
isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
|
||||
[[ ! $myIP || $isLAN ]] && myIP="127.0.1.1"
|
||||
|
||||
echo "Getting latest online TW..."
|
||||
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1);
|
||||
|
|
|
@ -23,6 +23,8 @@ ASTRONAUTENS=$(ipfs key list -l | grep -w $PLAYER | cut -d ' ' -f1)
|
|||
[[ ! $ASTRONAUTENS ]] && echo "$PLAYER IPNS INTROUVABLE" && exit 1
|
||||
|
||||
myIP=$(hostname -I | awk '{print $1}' | head -n 1)
|
||||
isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
|
||||
[[ ! $myIP || $isLAN ]] && myIP="127.0.1.1"
|
||||
|
||||
## EXPORT [tag[voeu]]
|
||||
echo "## EXTRACTION DE NOUVEAUX VOEUX pour $PLAYER TW"
|
||||
|
|
|
@ -23,6 +23,8 @@ ASTRONAUTENS=$(ipfs key list -l | grep -w $PLAYER | cut -d ' ' -f1)
|
|||
MOATS=$(date -u +"%Y%m%d%H%M%S%4N")
|
||||
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
|
||||
myIP=$(hostname -I | awk '{print $1}' | head -n 1)
|
||||
isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
|
||||
[[ ! $myIP || $isLAN ]] && myIP="127.0.1.1"
|
||||
|
||||
mkdir -p ~/.zen/tmp/${IPFSNODEID}/g1voeu/${ASTRONAUTENS}
|
||||
|
||||
|
|
10
_12345.sh
10
_12345.sh
|
@ -9,10 +9,10 @@
|
|||
# Then publish map of json DApp data
|
||||
#
|
||||
MOATS=$(date -u +"%Y%m%d%H%M%S%4N")
|
||||
echo "${MOATS}" > ~/.zen/tmp/swarm/${IPFSNODEID}/.moats
|
||||
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
|
||||
PFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
|
||||
myIP=$(hostname -I | awk '{print $1}' | head -n 1)
|
||||
[[ ! $myIP ]] && myIP="127.0.1.1"
|
||||
isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
|
||||
[[ ! $myIP || $isLAN ]] && myIP="127.0.1.1"
|
||||
|
||||
PORT=12345
|
||||
|
||||
|
@ -24,8 +24,12 @@ ncrunning=$(ps auxf --sort=+utime | grep -w 'nc -l -p 12345' | grep -v -E 'color
|
|||
|
||||
## RESET MEMORY
|
||||
rm -Rf ~/.zen/tmp/swarm/*
|
||||
## NAME PUBLISH EMPTY !!!
|
||||
ipfs name publish --allow-offline /ipfs/Qmc5m94Gu7z62RC8waSKkZUrCCBJPyHbkpmGzEePxy2oXJ
|
||||
|
||||
mkdir -p ~/.zen/tmp/swarm/${IPFSNODEID}
|
||||
echo "${MOATS}" > ~/.zen/tmp/swarm/${IPFSNODEID}/.moats
|
||||
|
||||
# REFRESH FROM BOOTSTRAP (COULD, SHOULD BE MY FRIENDS !)
|
||||
while true; do
|
||||
|
||||
|
|
|
@ -17,7 +17,8 @@ echo "y est raccordé... D'autres fils sortent de l'appareil. Une webcam. Une i
|
|||
echo
|
||||
echo "Que voulez vous faire?"
|
||||
myIP=$(hostname -I | awk '{print $1}' | head -n 1)
|
||||
[[ ! $myIP ]] && myIP="127.0.1.1"
|
||||
isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
|
||||
[[ ! $myIP || $isLAN ]] && myIP="127.0.1.1"
|
||||
|
||||
while true; do
|
||||
read -p "> " nsewuh
|
||||
|
|
|
@ -43,6 +43,8 @@ ASTRONAUTENS=$(ipfs key list -l | grep -w "${PLAYER}" | cut -d ' ' -f 1)
|
|||
MOATS=$(date -u +"%Y%m%d%H%M%S%4N")
|
||||
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
|
||||
myIP=$(hostname -I | awk '{print $1}' | head -n 1)
|
||||
isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
|
||||
[[ ! $myIP || $isLAN ]] && myIP="127.0.1.1"
|
||||
|
||||
URL="$1"
|
||||
if [ $URL ]; then
|
||||
|
|
2
start.sh
2
start.sh
|
@ -7,6 +7,8 @@
|
|||
MY_PATH="`dirname \"$0\"`" # relative
|
||||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||
myIP=$(hostname -I | awk '{print $1}' | head -n 1)
|
||||
isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
|
||||
[[ ! $myIP || $isLAN ]] && myIP="127.0.1.1"
|
||||
|
||||
ME="${0##*/}"
|
||||
TS=$(date -u +%s%N | cut -b1-13)
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
MY_PATH="`dirname \"$0\"`" # relative
|
||||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||
myIP=$(hostname -I | awk '{print $1}' | head -n 1)
|
||||
isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
|
||||
[[ ! $myIP || $isLAN ]] && myIP="127.0.1.1"
|
||||
|
||||
ME="${0##*/}"
|
||||
######################################################################### CONNECT PLAYER WITH GCHANGE
|
||||
|
|
|
@ -22,6 +22,8 @@ LIBRA=$(head -n 2 ~/.zen/Astroport.ONE/A_boostrap_nodes.txt | tail -n 1 | cut -d
|
|||
MOATS=$(date -u +"%Y%m%d%H%M%S%4N")
|
||||
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
|
||||
myIP=$(hostname -I | awk '{print $1}' | head -n 1)
|
||||
isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
|
||||
[[ ! $myIP || $isLAN ]] && myIP="127.0.1.1"
|
||||
|
||||
## LOCAL
|
||||
[[ ${PLAYER} ]] && ASTRONAUTENS=$(ipfs key list -l | grep -w "${PLAYER}" | cut -d ' ' -f 1)
|
||||
|
|
|
@ -38,7 +38,10 @@ select voeu in "${vlist[@]}"; do
|
|||
voeu=$(echo $voeu | cut -d ':' -f2) ## Get G1PUB part
|
||||
TITLE=$(cat ~/.zen/game/world/$voeu/.pepper) ## Get Voeu title (pepper) = simple GUI form + Name collision => Voeu fusion
|
||||
|
||||
myIP=$(hostname -I | awk '{print $1}' | head -n 1)
|
||||
myIP=$(hostname -I | awk '{print $1}' | head -n 1)
|
||||
isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
|
||||
[[ ! $myIP || $isLAN ]] && myIP="127.0.1.1"
|
||||
|
||||
VOEUXNS=$(ipfs key list -l | grep $voeu | cut -d ' ' -f1)
|
||||
|
||||
choices=("TW" "G1")
|
||||
|
|
|
@ -21,7 +21,8 @@ IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
|
|||
MOATS=$(date -u +"%Y%m%d%H%M%S%4N")
|
||||
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
|
||||
myIP=$(hostname -I | awk '{print $1}' | head -n 1)
|
||||
|
||||
isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
|
||||
[[ ! $myIP || $isLAN ]] && myIP="127.0.1.1"
|
||||
|
||||
# ~/.zen/game/players/$PLAYER/ipfs/.${IPFSNODEID}/astroport/kodi/vstream/${PREFIX}ASTRXBIAN
|
||||
# Astropot/Kodi/Vstream source reads ${PREFIX}ASTRXBIAN from http://${myIP}:8080/.$IPFNODEID/
|
||||
|
|
|
@ -26,6 +26,8 @@ LIBRA=$(head -n 2 ~/.zen/Astroport.ONE/A_boostrap_nodes.txt | tail -n 1 | cut -d
|
|||
MOATS=$(date -u +"%Y%m%d%H%M%S%4N")
|
||||
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
|
||||
myIP=$(hostname -I | awk '{print $1}' | head -n 1)
|
||||
isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
|
||||
[[ ! $myIP || $isLAN ]] && myIP="127.0.1.1"
|
||||
|
||||
mkdir -p ~/.zen/game/players/${PLAYER}/vlog
|
||||
|
||||
|
|
Loading…
Reference in New Issue