From 52dbd575b7252ab7b03de685c92c6940d10ec926 Mon Sep 17 00:00:00 2001 From: fred Date: Sat, 19 Nov 2022 20:34:28 +0100 Subject: [PATCH] grep -rl 'astroport.localhost' ./ | xargs sed -i 's/astroport.localhost/ipfs.localhost/g' --- 12345.sh | 2 +- 20h12.process.sh | 2 +- ASTROBOT/G1Voeu.sh | 2 +- ASTROBOT/PLAYER.refresh.sh | 2 +- ASTROBOT/VOEUX.create.sh | 2 +- ASTROBOT/VOEUX.refresh.sh | 2 +- _12345.sh | 2 +- ajouter_media.sh | 2 +- start.sh | 2 +- tools/Connect_PLAYER_To_Gchange.sh | 2 +- tools/VISA.new.sh | 4 ++-- tools/VISA.print.sh | 2 +- tools/VOEUX.print.sh | 2 +- tools/ipfs_config.sh | 4 ++-- tools/mailjet.sh | 7 +++++-- tools/new_file_in_astroport.sh | 2 +- tools/vlc_webcam.sh | 2 +- www/index.html | 2 +- 18 files changed, 24 insertions(+), 21 deletions(-) diff --git a/12345.sh b/12345.sh index 2f7e1f2d..5b4943c9 100755 --- a/12345.sh +++ b/12345.sh @@ -17,7 +17,7 @@ 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="astroport.localhost" +[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost" PORT=12345 diff --git a/20h12.process.sh b/20h12.process.sh index 20042b43..68a2235b 100755 --- a/20h12.process.sh +++ b/20h12.process.sh @@ -13,7 +13,7 @@ espeak "Ding" > /dev/null 2>&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="astroport.localhost" +[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost" ## CLEANING ~/.zen/tmp rm -Rf ~/.zen/tmp diff --git a/ASTROBOT/G1Voeu.sh b/ASTROBOT/G1Voeu.sh index 4b5fbd86..db8c931d 100755 --- a/ASTROBOT/G1Voeu.sh +++ b/ASTROBOT/G1Voeu.sh @@ -65,7 +65,7 @@ echo # CRYPTO BUG. TODO use natools to protect and share key with Ŋ1 only ;) 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="astroport.localhost" +[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost" echo " Passerelle : $myIP" diff --git a/ASTROBOT/PLAYER.refresh.sh b/ASTROBOT/PLAYER.refresh.sh index a16269c3..7e2013d9 100755 --- a/ASTROBOT/PLAYER.refresh.sh +++ b/ASTROBOT/PLAYER.refresh.sh @@ -52,7 +52,7 @@ for PLAYER in $(ls -t ~/.zen/game/players/); do 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="astroport.localhost" +[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost" echo "Getting latest online TW..." YOU=$(ipfs swarm peers >/dev/null 2>&1 && echo "$USER" || ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1); diff --git a/ASTROBOT/VOEUX.create.sh b/ASTROBOT/VOEUX.create.sh index 6b70c8e4..b05c2018 100755 --- a/ASTROBOT/VOEUX.create.sh +++ b/ASTROBOT/VOEUX.create.sh @@ -24,7 +24,7 @@ ASTRONAUTENS=$(ipfs key list -l | grep -w $PLAYER | cut -d ' ' -f1) 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="astroport.localhost" +[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost" ## EXPORT [tag[voeu]] echo "## EXTRACTION DE NOUVEAUX VOEUX pour $PLAYER TW" diff --git a/ASTROBOT/VOEUX.refresh.sh b/ASTROBOT/VOEUX.refresh.sh index 63d5fb6d..c6a50ea0 100755 --- a/ASTROBOT/VOEUX.refresh.sh +++ b/ASTROBOT/VOEUX.refresh.sh @@ -31,7 +31,7 @@ IPFSNODEID=$(ipfs id -f='\n') 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="astroport.localhost" +[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost" mkdir -p ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/g1voeu diff --git a/_12345.sh b/_12345.sh index 4b7e1c73..77aa5d6a 100755 --- a/_12345.sh +++ b/_12345.sh @@ -13,7 +13,7 @@ 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="astroport.localhost" +[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost" PORT=12345 diff --git a/ajouter_media.sh b/ajouter_media.sh index 8b1d6366..74f87c2c 100755 --- a/ajouter_media.sh +++ b/ajouter_media.sh @@ -44,7 +44,7 @@ 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="astroport.localhost" +[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost" URL="$1" if [ $URL ]; then diff --git a/start.sh b/start.sh index cebcc6a4..c587bd17 100755 --- a/start.sh +++ b/start.sh @@ -8,7 +8,7 @@ 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="astroport.localhost" +[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost" ME="${0##*/}" TS=$(date -u +%s%N | cut -b1-13) diff --git a/tools/Connect_PLAYER_To_Gchange.sh b/tools/Connect_PLAYER_To_Gchange.sh index 5a88cae2..0c2514e7 100755 --- a/tools/Connect_PLAYER_To_Gchange.sh +++ b/tools/Connect_PLAYER_To_Gchange.sh @@ -5,7 +5,7 @@ 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="astroport.localhost" +[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost" IPFSNODEID=$(ipfs id -f='\n') diff --git a/tools/VISA.new.sh b/tools/VISA.new.sh index b7484bec..afe7bfcb 100755 --- a/tools/VISA.new.sh +++ b/tools/VISA.new.sh @@ -23,7 +23,7 @@ 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="astroport.localhost" +[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost" ## LOCAL [[ ${PLAYER} ]] && ASTRONAUTENS=$(ipfs key list -l | grep -w "${PLAYER}" | cut -d ' ' -f 1) @@ -197,7 +197,7 @@ G1PUB=$(cat /tmp/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2) sed -i "s~k2k4r8kxfnknsdf7tpyc46ks2jb3s9uvd3lqtcv9xlq9rsoem7jajd75~${ASTRONAUTENS}~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html sed -i "s~ipfs.infura.io~tube.copylaradio.com~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html - sed -i "s~127.0.0.1~$myIP~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html # 8080 & 5001 BEING THE RECORDING GATEWAY (WAN or astroport.localhost) + sed -i "s~127.0.0.1~$myIP~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html # 8080 & 5001 BEING THE RECORDING GATEWAY (WAN or ipfs.localhost) # echo "# CRYPTO ENCODING myIP -> CRYPTIP" diff --git a/tools/VISA.print.sh b/tools/VISA.print.sh index ac17d04c..086b992e 100755 --- a/tools/VISA.print.sh +++ b/tools/VISA.print.sh @@ -49,7 +49,7 @@ sudo brother_ql_print /tmp/toprint.bin $LP ### PRINT PLAYER TW myIP link 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="astroport.localhost" +[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost" TUBE=$(head -n 2 ~/.zen/Astroport.ONE/A_boostrap_nodes.txt | tail -n 1 | cut -d ' ' -f 3) diff --git a/tools/VOEUX.print.sh b/tools/VOEUX.print.sh index 9426aecc..c946ef07 100755 --- a/tools/VOEUX.print.sh +++ b/tools/VOEUX.print.sh @@ -19,7 +19,7 @@ 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="astroport.localhost" +[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost" echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" ############################### diff --git a/tools/ipfs_config.sh b/tools/ipfs_config.sh index eeed79fe..13403fe9 100755 --- a/tools/ipfs_config.sh +++ b/tools/ipfs_config.sh @@ -21,8 +21,8 @@ ipfs config --json Experimental.P2pHttpProxy true ipfs config --json Swarm.ConnMgr.LowWater 20 ipfs config --json Swarm.ConnMgr.HighWater 40 -[[ ! $isLAN ]] && ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://'$myIP':8080", "http://astroport.localhost:8080", "http://127.0.0.1:8080", "http://127.0.1.1:8080" ]' \ - || ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://127.0.0.1:8080", "http://astroport.localhost:8080", "http://127.0.1.1:8080" ]' +[[ ! $isLAN ]] && ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://'$myIP':8080", "http://ipfs.localhost:8080", "http://127.0.0.1:8080", "http://127.0.1.1:8080" ]' \ + || ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://127.0.0.1:8080", "http://ipfs.localhost:8080", "http://127.0.1.1:8080" ]' ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST"]' ipfs config --json API.HTTPHeaders.Access-Control-Allow-Credentials '["true"]' diff --git a/tools/mailjet.sh b/tools/mailjet.sh index 72899669..23ffe392 100755 --- a/tools/mailjet.sh +++ b/tools/mailjet.sh @@ -7,6 +7,9 @@ MY_PATH="`dirname \"$0\"`" # relative MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized ME="${0##*/}" +IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID) + + echo ' ######################################################################## # \\/// @@ -22,8 +25,8 @@ messfile="$2" # FICHIER A AJOUTER AU CORPS MESSAGE [[ ! $1 ]] && mail="support@qo-op.com" -SUBJECT="[(♥‿‿♥)] Astronaute. Bonjour. " -MESSAGE="( ◕‿◕)\n\n Salut $PLAYER\n\n\n Activez votre TW http://tube.copylaradio.com:1234 .\n\nAstroport" +SUBJECT="[(♥‿‿♥)] Astronaute. Message votre Station Astroport.ONE" +MESSAGE="( ◕‿◕)\n\n Bonjour $PLAYER\n\n\n Activez votre TW http://tube.copylaradio.com:1234 .\n\nAstroport\n$IPFSNODEID" echo "From: support@g1sms.fr To: EMAIL diff --git a/tools/new_file_in_astroport.sh b/tools/new_file_in_astroport.sh index bc07ed4a..1dafd09f 100755 --- a/tools/new_file_in_astroport.sh +++ b/tools/new_file_in_astroport.sh @@ -23,7 +23,7 @@ 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="astroport.localhost" +[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost" alias zenity='zenity 2> >(grep -v GtkDialog >&2)' diff --git a/tools/vlc_webcam.sh b/tools/vlc_webcam.sh index 152742e9..e7aa298d 100755 --- a/tools/vlc_webcam.sh +++ b/tools/vlc_webcam.sh @@ -27,7 +27,7 @@ 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="astroport.localhost" +[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost" mkdir -p ~/.zen/game/players/${PLAYER}/vlog diff --git a/www/index.html b/www/index.html index fa0aa59a..68ada18f 100644 --- a/www/index.html +++ b/www/index.html @@ -124,7 +124,7 @@ function cacheIt (appName, hash, nodeId = '') { var gatewayProtocol = 'http'; - var gatewayDomain = 'astroport.localhost'; + var gatewayDomain = 'ipfs.localhost'; var gatewayPort = '1234';