From 9e7618739577da4160b00aa7f9df2aa4d0820e7d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 28 Feb 2021 22:26:15 +0100 Subject: [PATCH] Set log_path to systemd --- scripts/change_url | 3 ++- scripts/install | 6 ++---- scripts/restore | 2 +- scripts/upgrade | 3 ++- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 0e2df49..3c1994d 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -28,6 +28,7 @@ ynh_script_progression --message="Loading installation settings..." --weight=1 # Needed for helper "ynh_add_nginx_config" final_path=$(ynh_app_setting_get --app=$app --key=final_path) +port=$(ynh_app_setting_get --app=$app --key=port) #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP @@ -107,7 +108,7 @@ fi #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=5 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action=start --log_path="systemd" #================================================= # RELOAD NGINX diff --git a/scripts/install b/scripts/install index b702a0b..e690744 100755 --- a/scripts/install +++ b/scripts/install @@ -138,7 +138,7 @@ ynh_use_logrotate #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=2 -yunohost service add $app --description="Media server for your comics, manga and magazines" --log="/var/log/$app/$app.log" +yunohost service add $app --description="Media server for your comics, manga and magazines" --log="systemd" #================================================= # START SYSTEMD SERVICE @@ -146,7 +146,7 @@ yunohost service add $app --description="Media server for your comics, manga and ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service -ynh_systemd_action --service_name=$app --action=start --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action=start --log_path="systemd" #================================================= # SETUP SSOWAT @@ -159,8 +159,6 @@ then ynh_permission_update --permission="main" --add="visitors" fi -#ynh_permission_create --permission="api" --url "/api" --allowed="visitors" --show_tile="false" --protected="true" - #================================================= # RELOAD NGINX #================================================= diff --git a/scripts/restore b/scripts/restore index a58a5b8..a1f9107 100755 --- a/scripts/restore +++ b/scripts/restore @@ -110,7 +110,7 @@ yunohost service add $app --description="Media server for your comics, manga and #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=3 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action=start --log_path="systemd" #================================================= # RESTORE THE LOGROTATE CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 0bd477b..c3d6cd0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -108,6 +108,7 @@ ynh_add_systemd_config # Set permissions on app files chown -R $app: $final_path +chmod +x $final_path/app.jar #================================================= # SETUP LOGROTATE @@ -129,7 +130,7 @@ yunohost service add $app --description="Media server for your comics, manga and #================================================= ynh_script_progression --message="Starting a systemd service..." --time --weight=1 -ynh_systemd_action --service_name=$app --action=start --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action=start --log_path="systemd" #================================================= # RELOAD NGINX