From 17e0ae3822c4717f30a4c867782015f005b54729 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 18 Feb 2021 19:48:59 +0100 Subject: [PATCH] Update upgrade --- scripts/upgrade | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 2a909aa..180ecca 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -192,7 +192,13 @@ chmod 755 -R $final_path/_data ynh_script_progression --message="Upgrading Piwigo with cURL..." --weight=6 # Set the app as temporarily public for cURL call -ynh_permission_update --permission="main" --add="visitors" +ynh_permission_has_user --permission="main" --user="visitors" +contains_visitors=$? + +if [ $contains_visitors -eq 1 ] +then + ynh_permission_update --permission="main" --add="visitors" +fi # Reload NGINX ynh_systemd_action --service_name=nginx --action=reload