just make it right this time
This commit is contained in:
parent
3651351701
commit
9573c4382d
|
@ -152,6 +152,7 @@ fi
|
|||
echo "JUKEBOX init"
|
||||
[[ -d /var/www/loveland/jukebox/albumart ]] && sudo chmod -R 777 /var/www/loveland/jukebox/albumart
|
||||
[[ -d /var/www/loveland/jukebox/prefs ]] && sudo chmod -R 777 /var/www/loveland/jukebox/prefs
|
||||
[[ -d /var/www/loveland/g1barre/img/qrcodes ]] && sudo chmod -R 777 /var/www/loveland/g1barre/img/qrcodes
|
||||
|
||||
# CONFIG NGINX - LOVE LAND FRONTAL WEB PAGE
|
||||
echo "$NODENAME" | figlet -f slant | lolcat
|
||||
|
|
|
@ -70,11 +70,11 @@ isLAN=$(echo $tryme | cut -f3 -d '/' | grep -E "/(^127\.)|(^192\.168\.)|(^fd42\:
|
|||
|
||||
trymev4=$(ipfs id | jq -r .Addresses[] | grep $(hostname -I | cut -f 1 -d ' '))
|
||||
isLANv4=$(echo $trymev4 | cut -f3 -d '/' | grep -E "/(^127\.)|(^192\.168\.)|(^fd42\:)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
|
||||
[[ $isLAN && ! $isLANv4 ]] && sbotc publish '{"type":"ipfstryme","text":"'"$trymev4"'"}'
|
||||
[[ $isLAN && ! $isLANv4 ]] && sbotc publish '{"type":"ipfstryme","text":"'"$trymev4"'"}' && tryme="$trymev4"
|
||||
|
||||
trymev6=$(ipfs id | jq -r .Addresses[] | grep $(hostname -I | cut -f 2 -d ' '))
|
||||
isLANv6=$(echo $trymev6 | cut -f3 -d '/' | grep -E "/(^127\.)|(^192\.168\.)|(^fd42\:)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
|
||||
[[ $isLAN && $isLANv4 && ! $isLANv6 ]] && sbotc publish '{"type":"ipfstryme","text":"'"$trymev6"'"}'
|
||||
[[ $isLAN && $isLANv4 && ! $isLANv6 ]] && sbotc publish '{"type":"ipfstryme","text":"'"$trymev6"'"}' && tryme="$trymev6"
|
||||
|
||||
################################
|
||||
# ADD Cesium+ informations
|
||||
|
@ -222,12 +222,15 @@ echo "$WHOAMI" > ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_ssb.whoami
|
|||
echo "$G1PUB" > ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.pubkey
|
||||
|
||||
# IPFS Node PUBLISH Adresses so Pub can become bootstrap for ${g1author}
|
||||
ipfs id | jq -r .Addresses[] > ~/.zen/ipfs/.${ipfsnodeid}/Addresses
|
||||
ipfs id | jq -r .Addresses[] > ~/.zen/ipfs/.${IPFSNODEID}/Addresses
|
||||
# IPFS Node PUBLISH AgentVersion & repo.stat
|
||||
ipfs id | jq -r .AgentVersion > ~/.zen/ipfs/.${ipfsnodeid}/AgentVersion
|
||||
ipfs repo stat > ~/.zen/ipfs/.${ipfsnodeid}/repo.stat
|
||||
ipfs id | jq -r .AgentVersion > ~/.zen/ipfs/.${IPFSNODEID}/AgentVersion
|
||||
ipfs repo stat > ~/.zen/ipfs/.${IPFSNODEID}/repo.stat
|
||||
|
||||
echo "$tryme" > ~/.zen/ipfs/.${IPFSNODEID}/tryme.addr
|
||||
echo "$diskperf" > ~/.zen/ipfs/.${IPFSNODEID}/disk.perf
|
||||
echo $(df ~/.ipfs/ | tail -n 1 | awk '{print $4}') > ~/.zen/ipfs/.${IPFSNODEID}/disk.bytes
|
||||
|
||||
ipfs id | jq -r .Addresses[] | tail -n 1 > ~/.zen/ipfs/.${ipfsnodeid}/tryme.addr
|
||||
|
||||
IWALLETS=$(ipfs add -rHq ~/.zen/ipfs | tail -n 1)
|
||||
NODEIPNS=$(ipfs name publish --allow-offline --quieter /ipfs/$IWALLETS)
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
## In case OLD IPFSNODEID exists (remove it)
|
||||
IPFSNODEID=$(ipfs id -f='<id>\n') && [[ $IPFSNODEID == "" ]] && exit 1
|
||||
for DOTQm in ~/.zen/ipfs/.Qm*; do
|
||||
Qm=$(echo $DOTQm | cut -d '/' -f 6 | cut -d '.' -f 2)
|
||||
[[ "$Qm" != "$IPFSNODEID" && "$Qm" != "" ]] && rm -Rf $DOTQm && echo "OLD IPFS ID REMOVED"
|
||||
done
|
|
@ -60,8 +60,8 @@ mkdir -p $DIR/chains
|
|||
# sudo mount -t tmpfs -o size=50m tmpfs /mnt/ramdisk
|
||||
chmod -R 777 /tmp/zen/
|
||||
|
||||
# KEEP /tmp/zen/current.duniter for 15 mn
|
||||
find /tmp/zen/ -cmin +15 -type f -name "current.duniter" -exec rm -f '{}' \;
|
||||
# KEEP /tmp/zen/current.duniter for 5 mn
|
||||
find /tmp/zen/ -cmin +5 -type f -name "current.duniter" -exec rm -f '{}' \;
|
||||
[[ -f /tmp/zen/current.duniter ]] && cat /tmp/zen/current.duniter && exit 0
|
||||
|
||||
##### $DIR/duniter_nodes.txt REFRESH after 20 minutes #####
|
||||
|
|
|
@ -42,9 +42,8 @@ HIT ENTER TO CONTINUE
|
|||
read letsgo
|
||||
fi
|
||||
# "ipfs daemon" MUST be RUNNING
|
||||
[[ ! $(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) ]] \
|
||||
&& echo "EXIT! PLEASE INSTALL & RUN ipfs daemon WITH curl -s https://git.p2p.legal/axiom-team/astroport/raw/master/.install/ipfs_alone.sh | bash " \
|
||||
&& 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 "EXIT! PLEASE INSTALL & RUN ipfs daemon WITH curl -s https://git.p2p.legal/axiom-team/astroport/raw/master/.install/ipfs_alone.sh | bash " && exit 1
|
||||
|
||||
# ~/.zen is ASTROPORT living place.
|
||||
[[ ! -d ~/.zen/astroport ]] && mkdir -p ~/.zen/astroport
|
||||
|
|
Loading…
Reference in New Issue