diff --git a/scripts/backup b/scripts/backup index 3b5405a..b640dd7 100644 --- a/scripts/backup +++ b/scripts/backup @@ -14,8 +14,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { - ### Remove this function if there's nothing to clean before calling the remove script. - true + ynh_clean_check_starting } # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -38,7 +37,7 @@ service_config=$(ynh_app_setting_get --app=$app --key=service_config) #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=2 -ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="stop" #================================================= # BACKUP THE APP MAIN DIR @@ -82,7 +81,7 @@ ynh_backup --src_path="/home/yunohost.airsonic" --is_big #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=12 -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="$final_path/airsonic.log" --line_match="Started Application in" #================================================= # END OF SCRIPT diff --git a/scripts/change_url b/scripts/change_url index 53254ea..88db807 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -54,7 +54,7 @@ fi #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="stop" #================================================= # MODIFY URL IN NGINX CONF diff --git a/scripts/remove b/scripts/remove index 79a50bc..78f741b 100644 --- a/scripts/remove +++ b/scripts/remove @@ -90,9 +90,6 @@ fi # REMOVE FILES #================================================= -# Remove the log files -ynh_secure_remove --file="/var/log/$app/" - ynh_secure_remove --file="$service_config" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 8c710ae..c2fe124 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -79,8 +79,7 @@ ynh_abort_if_errors #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" - +ynh_systemd_action --service_name=$app --action="stop" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #=================================================