diff --git a/scripts/backup b/scripts/backup index edae2c2..719bc83 100644 --- a/scripts/backup +++ b/scripts/backup @@ -58,6 +58,12 @@ ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" ynh_backup --src_path="/etc/systemd/system/$app.service" +#================================================= +# BACKUP VARIOUS FILES +#================================================= + +ynh_backup --src_path="/etc/cron.d/$app" + #================================================= # BACKUP THE MYSQL DATABASE #================================================= diff --git a/scripts/remove b/scripts/remove index 53b546e..65fe5bc 100644 --- a/scripts/remove +++ b/scripts/remove @@ -82,6 +82,14 @@ ynh_script_progression --message="Removing dependencies..." --weight=1 # Remove metapackage and its dependencies ynh_remove_app_dependencies +#================================================= +# REMOVE VARIOUS FILES +#================================================= +ynh_script_progression --message="Removing various files..." --weight=1 + +# Remove a cron file +ynh_secure_remove --file="/etc/cron.d/$app" + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/restore b/scripts/restore index 7a5b057..c009a3b 100644 --- a/scripts/restore +++ b/scripts/restore @@ -92,6 +92,13 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql +#================================================= +# RESTORE VARIOUS FILES +#================================================= +ynh_script_progression --message="Restoring various files..." --weight=1 + +ynh_restore_file --origin_path="/etc/cron.d/$app" + #================================================= # RESTORE SYSTEMD #=================================================