diff --git a/scripts/remove b/scripts/remove index 367e0c5..d53be6d 100755 --- a/scripts/remove +++ b/scripts/remove @@ -43,6 +43,14 @@ ynh_script_progression --message="Stopping and removing the systemd service..." # Remove the dedicated systemd config ynh_remove_systemd_config +#================================================= +# REMOVE LOGROTATE CONFIGURATION +#================================================= +ynh_script_progression --message="Removing logrotate configuration..." --time --weight=1 + +# Remove the app-specific logrotate config +ynh_remove_logrotate + #================================================= # REMOVE THE MYSQL DATABASE #================================================= @@ -83,14 +91,6 @@ ynh_script_progression --message="Removing PHP-FPM configuration..." --time --we # Remove the dedicated PHP-FPM config ynh_remove_fpm_config -#================================================= -# REMOVE LOGROTATE CONFIGURATION -#================================================= -ynh_script_progression --message="Removing logrotate configuration..." --time --weight=1 - -# Remove the app-specific logrotate config -ynh_remove_logrotate - #================================================= # CLOSE A PORT #================================================= diff --git a/scripts/restore b/scripts/restore index 31b3158..66f8e80 100755 --- a/scripts/restore +++ b/scripts/restore @@ -151,6 +151,13 @@ ynh_script_progression --message="Restoring the systemd configuration..." --time ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet +#================================================= +# RESTORE THE LOGROTATE CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the logrotate configuration..." --time --weight=1 + +ynh_restore_file --origin_path="/etc/logrotate.d/$app" + #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= @@ -165,13 +172,6 @@ ynh_script_progression --message="Starting a systemd service..." --time --weight ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" -#================================================= -# RESTORE THE LOGROTATE CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the logrotate configuration..." --time --weight=1 - -ynh_restore_file --origin_path="/etc/logrotate.d/$app" - #================================================= # GENERIC FINALIZATION #=================================================