From ba71359ac8af5bff1abeb4bfd52dd3061f97b612 Mon Sep 17 00:00:00 2001 From: polytan02 Date: Wed, 22 Feb 2017 14:28:06 +0000 Subject: [PATCH 1/3] parameter "language" doesn't exist I looked at jenkins to see why the upgrade fails and noticed this language parameter in the upgrade script. There is no trace of this paramater in other scripts so I guess it is a copy/paste from another upgrade script ? :) --- scripts/upgrade | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 4547608..506670d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -14,7 +14,6 @@ domain=$(ynh_app_setting_get "$app" domain) path=$(ynh_app_setting_get "$app" path) admin=$(ynh_app_setting_get "$app" admin) is_public=$(ynh_app_setting_get "$app" is_public) -language=$(ynh_app_setting_get "$app" language) # Remove trailing "/" for next commands path=${path%/} From 089da0f41039852beec9f66ed46b49c14d996510 Mon Sep 17 00:00:00 2001 From: polytan02 Date: Wed, 22 Feb 2017 14:29:34 +0000 Subject: [PATCH 2/3] Use php-fpm reload instead of restart --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 4547608..dc85e65 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -46,7 +46,7 @@ finalphpconf=/etc/php5/fpm/pool.d/$app.conf sudo cp ../conf/php-fpm.conf $finalphpconf sudo chown root: $finalphpconf sudo chmod 644 $finalphpconf -sudo service php5-fpm restart +sudo service php5-fpm reload ### PHP end ### # If app is public, add url to SSOWat conf as skipped_uris From 3b11c21df49aff73e546661f9c8c109e537e15f5 Mon Sep 17 00:00:00 2001 From: polytan02 Date: Wed, 22 Feb 2017 14:33:05 +0000 Subject: [PATCH 3/3] Adjustments on access permissions --- scripts/upgrade | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 4547608..eeb9ba5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -26,7 +26,8 @@ sudo cp -a ../sources/. $src_path # Set permissions to app files # you may need to make some file and/or directory writeable by www-data (nginx user) -sudo chown -R root: $src_path +sudo chown -R www-data:www-data $src_path +sudo chmod -R 755 $src_path # Modify Nginx configuration file and copy it to Nginx conf directory nginx_conf=../conf/nginx.conf @@ -36,6 +37,7 @@ sed -i "s@YNH_WWW_ALIAS@$src_path/@g" $nginx_conf # sed -i "s@YNH_WWW_APP@$app@g" $nginx_conf sudo cp $nginx_conf /etc/nginx/conf.d/$domain.d/$app.conf +sudo chmod 644 /etc/nginx/conf.d/$domain.d/$app.conf ### PHP ### # If a dedicated php-fpm process is used: