From e9eb8d46fcbcaf1e6d850abadec10b21059f64fd Mon Sep 17 00:00:00 2001 From: polytan02 Date: Mon, 13 Apr 2015 14:11:23 +0100 Subject: [PATCH] Update of php-fpm configuration --- scripts/install | 4 +++- scripts/remove | 2 +- scripts/upgrade | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 32f2b3f..3faf6c7 100644 --- a/scripts/install +++ b/scripts/install @@ -12,6 +12,8 @@ admin_email=$6 lang=$7 curl_inst=$8 +sudo yunohost app setting $app domain -v $domain + # Removal of trailing / path=${path%/} @@ -63,7 +65,7 @@ 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 +finalphpconf=/etc/php5/fpm/pool.d/$domain\_$app.conf sudo cp ../conf/php-fpm.conf $finalphpconf sudo chown root: $finalphpconf sudo chmod 644 $finalphpconf diff --git a/scripts/remove b/scripts/remove index 3941eb8..34daf3d 100644 --- a/scripts/remove +++ b/scripts/remove @@ -11,7 +11,7 @@ domain=$(sudo yunohost app setting $app domain) mysql -u root -p$root_pwd -e "DROP DATABASE $db_name ; DROP USER $db_user@localhost ;" sudo rm -rf /var/www/$app sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf -sudo rm -f /etc/php5/fpm/pool.d/$app.conf +sudo rm -f /etc/php5/fpm/pool.d/$domain\_$app.conf sudo service php5-fpm restart sudo service nginx reload diff --git a/scripts/upgrade b/scripts/upgrade index 80722d8..d9a7c71 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -34,7 +34,7 @@ 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 +finalphpconf=/etc/php5/fpm/pool.d/$domain\_$app.conf sudo cp ../conf/php-fpm.conf $finalphpconf sudo chown root: $finalphpconf sudo chmod 644 $finalphpconf