From 891e2eead2ff3c57293337de0a2420a6ef4526c8 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 4 Jan 2021 11:28:24 +0100 Subject: [PATCH] Add new permissions --- scripts/install | 10 +++------- scripts/restore | 2 +- scripts/upgrade | 17 +---------------- 3 files changed, 5 insertions(+), 24 deletions(-) diff --git a/scripts/install b/scripts/install index 806c943..015626a 100644 --- a/scripts/install +++ b/scripts/install @@ -165,7 +165,7 @@ chown -R $app: $final_path #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add $app --description "$app daemon for Ghost" +yunohost service add $app --description="$app daemon for Ghost" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE @@ -180,14 +180,10 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --l #================================================= ynh_script_progression --message="Configuring SSOwat..." -if [ $is_public -eq 0 ] -then # Remove the public access - ynh_app_setting_delete $app skipped_uris -fi -# Make app public if necessary +# Make app public if necessary or protect it if [ $is_public -eq 1 ] then - ynh_app_setting_set --app=$app --key=skipped_uris --value="/" + ynh_permission_update --permission "main" --add "visitors" fi #================================================= diff --git a/scripts/restore b/scripts/restore index 5dcc117..c3392d1 100755 --- a/scripts/restore +++ b/scripts/restore @@ -114,7 +114,7 @@ systemctl enable $app.service --quiet #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add $app --description "$app daemon for Ghost" +yunohost service add $app --description="$app daemon for Ghost" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/upgrade b/scripts/upgrade index c9e3eac..5f9f31e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -194,7 +194,7 @@ chown -R $app: $final_path #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add $app --description "$app daemon for Ghost" +yunohost service add $app --description="$app daemon for Ghost" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE @@ -203,21 +203,6 @@ ynh_script_progression --message="Starting a systemd service..." ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Ghost boot" -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Upgrading SSOwat configuration..." - -if [ $is_public -eq 0 ] -then # Remove the public access - ynh_app_setting_delete $app skipped_uris -fi -# Make app public if necessary -if [ $is_public -eq 1 ] -then - ynh_app_setting_set --app=$app --key=skipped_uris --value="/" -fi - #================================================= # RELOAD NGINX #=================================================