myIP changing

This commit is contained in:
fred 2022-09-27 02:00:50 +02:00
parent 883809f5c5
commit 61b8e4aa92
2 changed files with 7 additions and 7 deletions

View File

@ -35,6 +35,12 @@ for PLAYER in $(ls ~/.zen/game/players/); do
else
## Replace tube links with downloaded video ## TODO create LOG tiddler
$MY_PATH/../tools/TUBE.copy.sh ~/.zen/tmp/astro/index.html $PLAYER
## LAN TO WAN MIGRATION
myIP=$(hostname -I | awk '{print $1}' | head -n 1)
sed -i "s~192.168.199.191~${myIP}~g" ~/.zen/tmp/astro/index.html
echo "Setting new IP : $myIP"
echo "DIFFERENCE ?"
DIFF=$(diff ~/.zen/tmp/astro/index.html ~/.zen/game/players/$PLAYER/ipfs/moa/index.html)
if [[ $DIFF ]]; then
@ -83,12 +89,6 @@ for g1wish in $(ls ~/.zen/game/players/$PLAYER/voeux/); do
echo $IG1BAR > ~/.zen/game/world/$g1wish/.ig1barre
echo "Update new g1barre: /ipfs/$IG1BAR"
## LAN TO WAN MIGRATION
myIP=$(hostname -I | awk '{print $1}' | head -n 1)
sed -i "s~192.168.199.191~${myIP}~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html
echo $myIP > ~/.zen/game/world/$g1wish/.ip
echo "Setting new IP : $myIP"
MOATS=$(date -u +"%Y%m%d%H%M%S%4N")
echo "Avancement blockchain TW $PLAYER : $MOATS"
cp ~/.zen/game/players/$PLAYER/ipfs/moa/.chain ~/.zen/game/players/$PLAYER/ipfs/moa/.chain.$MOATS

View File

@ -47,7 +47,7 @@ do
## LAN TO WAN MIGRATION
myIP=$(hostname -I | awk '{print $1}' | head -n 1)
sed -i "s~192.168.199.191~${myIP}~g" ~/.zen/tmp/work/index.html
echo $myIP > ~/.zen/game/world/$voeu/.ip
echo $myIP > ~/.zen/game/world/$voeu/.myIP
echo "Setting new IP : $myIP"
echo "DIFFERENCE ?"