diff --git a/scripts/backup b/scripts/backup index 89ace40..8435f48 100755 --- a/scripts/backup +++ b/scripts/backup @@ -10,7 +10,7 @@ ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf" ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf" ynh_backup --src_path="/etc/logrotate.d/$app" ynh_backup --src_path="/opt/couchdb/etc/local.d/05-flohmarkt.ini" -# ynh_backup --src_path="/etc/yunohost/apps/$app" +ynh_backup --src_path="/etc/systemd/system/$app.service" # for the following backups we'll want to stop flohmarkt and couchdb # to guarentee a consistant state diff --git a/scripts/remove b/scripts/remove index e8c6b7b..fafd669 100755 --- a/scripts/remove +++ b/scripts/remove @@ -56,6 +56,10 @@ ynh_remove_fail2ban_config ynh_script_progression --message="Removing data directory..." --weight=2 ynh_secure_remove --file=$data_dir +# remove systemd service +ynh_script_progression --message="Removing data directory..." --weight=2 +ynh_remove_systemd_config + #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index f49f2f4..13075c1 100755 --- a/scripts/restore +++ b/scripts/restore @@ -65,6 +65,7 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app" # INTEGRATE SERVICE IN YUNOHOST ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 +ynh_restore_file --origin_path="/etc/systemd/system/$app.service" yunohost service add $app --description="A decentral federated small advertisement platform" --log="/var/log/$app/$app.log" ynh_systemd_action --action=start --line_match="INFO: Application startup complete."