diff --git a/scripts/install b/scripts/install index c4b6ba1..1044bf6 100644 --- a/scripts/install +++ b/scripts/install @@ -14,10 +14,10 @@ sudo yunohost app setting rainloop domain -v $domain # Check domain/path availability -#sudo yunohost app checkurl $domain$path -a rainloop -#if [[ ! $? -eq 0 ]]; then -# exit 1 -#fi +sudo yunohost app checkurl $domain$path -a rainloop +if [[ ! $? -eq 0 ]]; then + exit 1 +fi # Generate random password #db_pwd=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d 'A-Za-z0-9' | sed -n 's/\(.\{24\}\).*/\1/p') @@ -48,11 +48,11 @@ 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 +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"