From b56d251503a6cb17c966e8bb89bb30540334ffaa Mon Sep 17 00:00:00 2001 From: qo-op Date: Mon, 11 May 2020 18:50:23 +0200 Subject: [PATCH] nodename --- .install/loveland.sh | 6 ++++++ www/loveland.conf | 2 +- zen/tools/make_G1SSB_secret.sh | 5 ++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.install/loveland.sh b/.install/loveland.sh index d9253ff..1f8aabc 100755 --- a/.install/loveland.sh +++ b/.install/loveland.sh @@ -37,6 +37,12 @@ sudo apt-get install fail2ban nginx ssl-cert openssl-blacklist php-curl php-sqli sudo cp -f $MY_PATH/../www/loveland.conf /etc/nginx/conf.d/ $PHPVERSION=$(ps auxf | grep php-fpm | grep -v -E 'color=auto|grep' | head -n 1 | grep -oP '(?<=\().*(?=\))' | awk -F '/' '{print $4}') sudo sed -i "s/_PHPVERSION_/$PHPVERSION/g" /etc/nginx/conf.d/loveland.conf +nodename=$(cat /etc/hostname) +extension=$(echo $nodename | cut -d '.' -f 2) +if [[ $extension == $nodename ]]; then + nodename=$nodename.local +fi +sudo sed -i "s/_SERVERNAME_/$nodename/g" /etc/nginx/conf.d/loveland.conf sudo systemctl restart nginx || err=1 diff --git a/www/loveland.conf b/www/loveland.conf index 0dc7eab..cde560e 100644 --- a/www/loveland.conf +++ b/www/loveland.conf @@ -6,7 +6,7 @@ server { root /var/www/loveland; index index.php index.html index.htm; - server_name loveland; + server_name _SERVERNAME_; # _PHPVERSION_=$(ps auxf | grep php-fpm | grep -v -E 'color=auto|grep' | head -n 1 | grep -oP '(?<=\().*(?=\))' | awk -F '/' '{print $4}') diff --git a/zen/tools/make_G1SSB_secret.sh b/zen/tools/make_G1SSB_secret.sh index dde0751..04b285a 100755 --- a/zen/tools/make_G1SSB_secret.sh +++ b/zen/tools/make_G1SSB_secret.sh @@ -141,8 +141,6 @@ echo ' ScuttleButt communication client... ' if [[ ! $(which sbotc) ]]; then - - sudo apt install libsodium-dev build-essential imagemagick -y cd /tmp/ git clone https://git.scuttlebot.io/%25133ulDgs%2FoC1DXjoK04vDFy6DgVBB%2FZok15YJmuhD5Q%3D.sha256 sbotc @@ -331,7 +329,7 @@ ACTIVATE METAVERSE #SWARM0 INIT SEQUENCE... ALPHA - ALPHA - ALPHA - ALPHA ' -echo "Starting OASIS. http://$nodename:3000" +echo "Starting OASIS..." oasis --allow-host $nodename --host $nodename & sleep 7 @@ -340,6 +338,7 @@ sleep 7 ~/.zen/astroport/zen/cron_VRFY.sh echo "Finished... +OASIS: http://$nodename:3000 ######################################################################## !!!! PLEASE TEST THAT EVERYTHING IS ALRIGHT !!!! Please try ASTROPORT basic commands: