Replace nodename function in install scripts

This commit is contained in:
poka 2020-05-20 22:32:06 +02:00
parent 5348b4f1dd
commit 0a679c753b
3 changed files with 3 additions and 6 deletions

View File

@ -103,8 +103,7 @@ isLAN=$(echo $myip | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(
# Find 1st route gateway
myRouter=$(sudo route -n | head -n 3 | tail -n 1 | awk '{print $2}')
# Ask to the router its name (BOX DNS or system defined)
[[ $isLAN ]] && nodename=$(sudo nslookup $myip $myRouter | head -n 1 | awk -F ' = ' '{print $2}' | sed 's/\.[^.]*$//') \
|| nodename=$(sudo nslookup $myip | head -n 1 | awk -F ' = ' '{print $2}' | sed 's/\.[^.]*$//')
nodename=$(curl -s https://git.p2p.legal/axiom-team/astroport/raw/master/zen/tools/nodename | bash)
echo $nodename
if [[ ! $isLAN ]]; then

View File

@ -24,15 +24,13 @@ curl -s $gitpath/.install/ipfs_alone.sh | bash || exit 1
# Set environment variables
curl -s $gitpath/.install/sys_checkOS.sh noexec | bash || exit 1
. ~/.bashrc
# SSB install
echo -e "${c_green}2. Ḡ1/ScuttleButt anoptical layer$c_"
# ONCE YOU READ and AGREE. Run TrustFull QUICK Install !!
curl -s $gitpath/zen/tools/make_G1SSB_secret.sh | bash || exit 1
cd /home/$YOU/.zen/astroport
[[ $args =~ nextcloud ]] && sudo -E bash .install/nextcloud/install.sh
[[ $args =~ nextcloud ]] && cd /home/$USER/.zen/astroport && sudo -E bash .install/nextcloud/install.sh
echo -e "${c_green}Installation complete$c_"

View File

@ -91,7 +91,7 @@ echo '
\____/_/ |_/____/___//____/
' | lolcat
nodename=$(cat /etc/hostname)
nodename=$(curl -s https://git.p2p.legal/axiom-team/astroport/raw/master/zen/tools/nodename | bash)
extension=$(echo $nodename | cut -d '.' -f 2)
if [[ $extension == $nodename ]]; then
PUB="false"