From 93681011a4c7caab8f31a1babf4858efc1039188 Mon Sep 17 00:00:00 2001 From: qo-op Date: Thu, 14 May 2020 02:00:56 +0200 Subject: [PATCH] TRY ME --- .install/loveland.sh | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.install/loveland.sh b/.install/loveland.sh index 64125ee..ea395ed 100755 --- a/.install/loveland.sh +++ b/.install/loveland.sh @@ -53,23 +53,20 @@ sudo apt-get install fail2ban nginx ssl-cert php-curl php-sqlite3 php-gd php-jso # CONFIG NGINX - LOVE LAND FRONTAL WEB PAGE sudo cp -f /home/$YOU/.zen/astroport/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 # TODO : Adpapt to Internet BOX local DNS stategy -fi - - echo "ENTER Station accessible Network name !!! Suggestion : $nodename" read nodename +[[ $nodename == "" ]] && nodename=$(cat /etc/hostname) sudo sed -i "s/_SERVERNAME_/$nodename/g" /etc/nginx/conf.d/loveland.conf # INSTALL LOVELand WebSite LINKs if [[ ! -L /var/www/loveland ]]; then - sudo ln -s /home/$YOU/.zen/astroport/www/LOVELand/ /var/www/loveland + sudo ln -s /home/$YOU/.zen/astroport/www/LOVELand /var/www/loveland fi sudo chmod 777 /var/www/loveland/jukebox/albumart sudo chmod 777 /var/www/loveland/jukebox/prefs @@ -77,11 +74,12 @@ sudo chmod 777 /var/www/loveland/jukebox/prefs sudo systemctl restart nginx || err=1 if [[ $err ]]; then - echo -e "${c_red}Installation de LOVELand incomplète$c_" + echo -e "${c_red}Installation de LOVELand incomplète $c_" + echo "POST ISSUE! https://git.p2p.legal/axiom-team/astroport/issues" exit 1 else - echo -e "${c_green}LOVELand a été installé avec succès$c_" - echo "http://$nodename (TRY ME)" + echo -e "${c_green}LOVE Land a été installé avec succès$c_" + echo "OPEN Love Land Portal http://$nodename (TRY ME)" exit 0 fi