From 5b58280d3546253d0ff0c114679f9b60649a28da Mon Sep 17 00:00:00 2001 From: polytan02 Date: Sun, 8 Mar 2015 15:28:37 +0000 Subject: [PATCH] Configuration after nginx reload so that the web page is accessible --- scripts/install | 50 +++++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/scripts/install b/scripts/install index d70083d..226b350 100644 --- a/scripts/install +++ b/scripts/install @@ -43,6 +43,32 @@ sudo chown -R www-data:www-data $final_path sudo apt-get update -qq > /dev/null 2>&1 sudo apt-get install -y imagemagick > /dev/null 2>&1 + +# Modify Nginx configuration file and copy it to Nginx conf directory +sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf +sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf +sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf + +sed -i "s@NAMETOCHANGE@$app@g" ../conf/php-fpm.conf +finalphpconf=/etc/php5/fpm/pool.d/$app.conf +sudo cp ../conf/php-fpm.conf $finalphpconf +sudo chown root: $finalphpconf +sudo chmod 644 $finalphpconf + +# Make app public if necessary +sudo yunohost app setting $app is_public -v "$is_public" +if [ "$is_public" = "Yes" ]; +then + sudo yunohost app setting $app skipped_uris -v "/" +fi + + +# Reload Nginx and regenerate SSOwat conf +sudo service php5-fpm reload +sudo service nginx reload +sudo yunohost app ssowatconf + + # Configuration of phpBB #curl -k -X POST \ #-H "Host: $domain" \ @@ -107,27 +133,3 @@ sudo apt-get install -y imagemagick > /dev/null 2>&1 # We need to rename the install folder #sudo mv $final_path/install $final_path/install_old - -# Modify Nginx configuration file and copy it to Nginx conf directory -sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf -sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf -sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf - -sed -i "s@NAMETOCHANGE@$app@g" ../conf/php-fpm.conf -finalphpconf=/etc/php5/fpm/pool.d/$app.conf -sudo cp ../conf/php-fpm.conf $finalphpconf -sudo chown root: $finalphpconf -sudo chmod 644 $finalphpconf - -# Make app public if necessary -sudo yunohost app setting $app is_public -v "$is_public" -if [ "$is_public" = "Yes" ]; -then - sudo yunohost app setting $app skipped_uris -v "/" -fi - - -# Reload Nginx and regenerate SSOwat conf -sudo service php5-fpm reload -sudo service nginx reload -sudo yunohost app ssowatconf