diff --git a/scripts/install b/scripts/install index 208619a..fdb758e 100644 --- a/scripts/install +++ b/scripts/install @@ -26,6 +26,7 @@ db_user=$app # Initialize database and store mysql password for upgrade sudo yunohost app initdb $db_user -p $db_pwd sudo yunohost app setting rainloop mysqlpwd -v $db_pwd +sudo yunohost app setting rainloop domain -v $domain #mysql -u $db_user -p$db_pwd $db_user < ../sources/plugins/automatic_addressbook/SQL/mysql.initial.sql @@ -46,7 +47,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 3a752b4..8408ff1 100644 --- a/scripts/remove +++ b/scripts/remove @@ -10,7 +10,7 @@ domain=$(sudo yunohost app setting rainloop 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 300cb42..2fc1493 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -29,7 +29,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@rainloop@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