forked from axiom-team/astroport
little better LAN / WAN install difference
This commit is contained in:
parent
002b3bd3e8
commit
37b6f2e7d0
|
@ -37,7 +37,7 @@ sudo apt-get install ca-certificates git-core binutils rsync alsa-utils bc espea
|
||||||
## CONFIG MPD
|
## CONFIG MPD
|
||||||
sudo cp -f /home/$YOU/.zen/astroport/.install/templates/copylaradio/mpd.conf /etc/mpd.conf
|
sudo cp -f /home/$YOU/.zen/astroport/.install/templates/copylaradio/mpd.conf /etc/mpd.conf
|
||||||
sudo sed -i "s/_USER_/$USER/g" /etc/mpd.conf || err=1
|
sudo sed -i "s/_USER_/$USER/g" /etc/mpd.conf || err=1
|
||||||
mkdir ~/.config/mpd && sudo cp -f /etc/mpd.conf ~/.config/mpd/mpd.conf && chown $USER ~/.config/mpd/mpd.conf
|
mkdir ~/.config/mpd && sudo cp -f /etc/mpd.conf ~/.config/mpd/mpd.conf && sudo chown $USER ~/.config/mpd/mpd.conf
|
||||||
|
|
||||||
## MUSIC & PLAYLISTS
|
## MUSIC & PLAYLISTS
|
||||||
mkdir -p ~/.zen/music
|
mkdir -p ~/.zen/music
|
||||||
|
@ -60,7 +60,7 @@ sudo sed -i "s/_PHPVERSION_/$PHPVERSION/g" /etc/nginx/conf.d/loveland.conf
|
||||||
nodename=$(cat /etc/hostname)
|
nodename=$(cat /etc/hostname)
|
||||||
echo "ENTER Station accessible Network name !!! Suggestion : $nodename"
|
echo "ENTER Station accessible Network name !!! Suggestion : $nodename"
|
||||||
read nodename
|
read nodename
|
||||||
[[ $nodename == "" ]] && echo "ENTER your Node Name? (or Hit ENTER)" && read nodename
|
[[ $nodename == "" ]] && echo "Are you sure? Hit ENTER to keep $nodename)" && read nodename
|
||||||
[[ $nodename == "" ]] && nodename=$(cat /etc/hostname)
|
[[ $nodename == "" ]] && nodename=$(cat /etc/hostname)
|
||||||
|
|
||||||
sudo sed -i "s/_SERVERNAME_/$nodename/g" /etc/nginx/conf.d/loveland.conf
|
sudo sed -i "s/_SERVERNAME_/$nodename/g" /etc/nginx/conf.d/loveland.conf
|
||||||
|
@ -77,9 +77,19 @@ sudo rm -f /etc/nginx/sites-enabled/default
|
||||||
|
|
||||||
sudo systemctl restart nginx || err=1
|
sudo systemctl restart nginx || err=1
|
||||||
|
|
||||||
echo "Trying to REstarting OASIS"
|
echo "Trying to REstarting OASIS and find good 'host' options"
|
||||||
kill -9 $(ps auxf --sort=+utime | grep -w oasis | grep -v -E 'color=auto|grep' | tail -n 1 | awk '{print $2}')
|
kill -9 $(ps auxf --sort=+utime | grep -w oasis | grep -v -E 'color=auto|grep' | tail -n 1 | awk '{print $2}')
|
||||||
oasis --allow-host $nodename --host $nodename 2>&1>/dev/null &
|
extension=$(echo $nodename | cut -d '.' -f 2)
|
||||||
|
myip=$(hostname -I | awk '{print $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])/")
|
||||||
|
|
||||||
|
if [[ ! $isLAN ]]; then
|
||||||
|
oasis --allow-host $nodename 2>&1>/dev/null &
|
||||||
|
echo "BE CAREFULL your SSB identity could be publicly controled..."
|
||||||
|
echo "BE CAREFULL your SSB identity could be publicly controled..."
|
||||||
|
else
|
||||||
|
oasis --allow-host $nodename --host $nodename 2>&1>/dev/null &
|
||||||
|
fi
|
||||||
|
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
|
|
|
@ -40,18 +40,6 @@ I am $(whoami) on $IPFSNODEID
|
||||||
"
|
"
|
||||||
|
|
||||||
##################################################################
|
##################################################################
|
||||||
# G1sms+ Node KEYS (G1wallet, gpg, IPNS)
|
|
||||||
echo '
|
|
||||||
|
|
||||||
________ ___________ ____ _ __ __
|
|
||||||
/ _/ __ \/ ____/ ___// __ \_____(_) __/ //_/__ __ __
|
|
||||||
/ // /_/ / /_ \__ \/ /_/ / ___/ / | / / ,< / _ \/ / / /
|
|
||||||
_/ // ____/ __/ ___/ / ____/ / / /| |/ / /| / __/ /_/ /
|
|
||||||
/___/_/ /_/ /____/_/ /_/ /_/ |___/_/ |_\___/\__, /
|
|
||||||
/____/
|
|
||||||
Formed with 24 first char IPFS .Identity.PrivKey
|
|
||||||
Used as gpg symetric key (soon deprecated?)
|
|
||||||
'
|
|
||||||
##################################################################
|
##################################################################
|
||||||
IPFSPrivKey=$(cat /home/$YOU/.ipfs/config | jq -r '.Identity.PrivKey') #"
|
IPFSPrivKey=$(cat /home/$YOU/.ipfs/config | jq -r '.Identity.PrivKey') #"
|
||||||
export IPFSPrivKey="${IPFSPrivKey:0:24}" #
|
export IPFSPrivKey="${IPFSPrivKey:0:24}" #
|
||||||
|
@ -62,11 +50,11 @@ if [ ! $IPFSPrivKey ]; then echo "FATAL ERROR:: IPFS Node.Identity.PrivKey IPFSP
|
||||||
##################################################################
|
##################################################################
|
||||||
# G1sms Service - G1Wallet
|
# G1sms Service - G1Wallet
|
||||||
#
|
#
|
||||||
|
[[ ! -d /home/$YOU/.zen/ipfs/.$IPFSNODEID/TASK/loveland_entrance ]] && mkdir -p /home/$YOU/.zen/ipfs/.$IPFSNODEID/TASK/loveland_entrance
|
||||||
|
|
||||||
# ONE TIME GIVE NODE_UIDNA
|
# ONE TIME GIVE NODE_UIDNA
|
||||||
if [[ ! -f /home/$YOU/.zen/ipfs/.$IPFSNODEID/G1SSB/_uidna ]]; then
|
if [[ ! -f /home/$YOU/.zen/ipfs/.$IPFSNODEID/G1SSB/_uidna ]]; then
|
||||||
# CREATE NODE G1 KEYS AND FILES
|
# CREATE NODE G1 KEYS AND FILES
|
||||||
mkdir -p /home/$YOU/.zen/ipfs/.$IPFSNODEID/TASK
|
|
||||||
|
|
||||||
####################################################################
|
####################################################################
|
||||||
# GIVE NAME TO NODE G1 WALLET: "6789diceware"
|
# GIVE NAME TO NODE G1 WALLET: "6789diceware"
|
||||||
|
|
|
@ -41,10 +41,11 @@ Love Land ENTRANCE CHECKING
|
||||||
$MY_PATH/ipfs_SWARM_refresh.sh
|
$MY_PATH/ipfs_SWARM_refresh.sh
|
||||||
|
|
||||||
for hashfile in $(ls /home/$YOU/.zen/ipfs_swarm/.Qm*/TASK/loveland_entrance); do
|
for hashfile in $(ls /home/$YOU/.zen/ipfs_swarm/.Qm*/TASK/loveland_entrance); do
|
||||||
# PHONE=$(cat $hashfile)
|
PHONE=$(cat $hashfile)
|
||||||
# HPHONE=$(basename -- "$hashfile")
|
HPHONE=$(basename -- "$hashfile")
|
||||||
# echo "We have received Ajax Astroport request from $PHONE"
|
echo "We have received Ajax Astroport request from $PHONE"
|
||||||
#done
|
done
|
||||||
|
# CHECK if PHONE is ALREADY registered in SWARM
|
||||||
# if [[ ! -f /home/$YOU/.zen/ipfs_swarm/.Qm*/CHANNEL/$PHONEHASH@*/_pub ]]; then
|
# if [[ ! -f /home/$YOU/.zen/ipfs_swarm/.Qm*/CHANNEL/$PHONEHASH@*/_pub ]]; then
|
||||||
# fi
|
# fi
|
||||||
# TODO SSB task relay MODE ??
|
# TODO SSB task relay MODE ??
|
||||||
|
@ -67,7 +68,7 @@ for hashfile in $(ls /tmp/loveland_entrance/); do
|
||||||
[[ $PARRAIN ]] && MEMRIB=$(sms_uid2key "$PARRAIN" "$PHONE" "$PIN") && echo "RIB PARRAIN: $MEMRIB"
|
[[ $PARRAIN ]] && MEMRIB=$(sms_uid2key "$PARRAIN" "$PHONE" "$PIN") && echo "RIB PARRAIN: $MEMRIB"
|
||||||
|
|
||||||
# CREATE G1 WALLET
|
# CREATE G1 WALLET
|
||||||
$MY_PATH/sms_NEW.sh "$PHONE" "$PARRAIN"
|
echo " RUN $MY_PATH/sms_NEW.sh "$PHONE" "$PARRAIN" "
|
||||||
|
|
||||||
else
|
else
|
||||||
# ACCOUNT ALREADY EXISTING
|
# ACCOUNT ALREADY EXISTING
|
||||||
|
@ -78,7 +79,7 @@ for hashfile in $(ls /tmp/loveland_entrance/); do
|
||||||
AMOUNTLOVE=$(bc -l <<< "scale=0; $AMOUNTG1 * 100 / $DUFACTOR")
|
AMOUNTLOVE=$(bc -l <<< "scale=0; $AMOUNTG1 * 100 / $DUFACTOR")
|
||||||
|
|
||||||
# DOUBLE AUTH SMS !!
|
# DOUBLE AUTH SMS !!
|
||||||
$MY_PATH/sms_AUTH.sh "$PHONE" "$PARRAIN"
|
echo "RUN $MY_PATH/sms_AUTH.sh "$PHONE" "$PARRAIN" "
|
||||||
|
|
||||||
|
|
||||||
mess="Bonjour! Astroport Station"
|
mess="Bonjour! Astroport Station"
|
||||||
|
|
|
@ -88,7 +88,7 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xl-9 mx-auto">
|
<div class="col-xl-9 mx-auto">
|
||||||
<div id="phoneresultat">
|
<div id="phoneresultat">
|
||||||
<br><h4>Soyons LIBRE<br>dirigeons nous vers un Futur plus Humain</h4>
|
<br><h4>Soyons LIBRE !!<br>ensemble vers un Futur plus Humain.</h4>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue