diff --git a/scripts/backup b/scripts/backup index 0df06ee..92a6caa 100644 --- a/scripts/backup +++ b/scripts/backup @@ -51,16 +51,24 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # SPECIFIC BACKUP #================================================= -# BACKUP VARIOUS FILES +# BACKUP LOGROTATE #================================================= ynh_backup --src_path="/etc/logrotate.d/$app" +#================================================= +# BACKUP SYSTEMD +#================================================= + +ynh_backup --src_path="/etc/systemd/system/jellyfin.service.d" +ynh_backup --src_path="/lib/systemd/system/jellyfin.service" + #================================================= # BACKUP VARIOUS FILES #================================================= ynh_backup --src_path="$config_path" +ynh_backup --src_path="/etc/default/jellyfin" #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index 5971618..6f4902b 100644 --- a/scripts/restore +++ b/scripts/restore @@ -65,6 +65,7 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$final_path" ynh_restore_file --origin_path="$config_path" +ynh_restore_file --origin_path="/etc/default/jellyfin" #================================================= # RECREATE THE DEDICATED USER @@ -102,6 +103,15 @@ ynh_exec_warn_less apt-get -f install $tempdir/jellyfin-ffmpeg.deb -y -o Dpkg::O ynh_exec_warn_less apt-get -f install $tempdir/jellyfin-server.deb -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold ynh_exec_warn_less apt-get -f install $tempdir/jellyfin-web.deb -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold +#================================================= +# RESTORE SYSTEMD +#================================================= +ynh_script_progression --message="Restoring the systemd configuration..." --time --weight=1 + +ynh_restore_file --origin_path="/etc/systemd/system/jellyfin.service.d" +ynh_restore_file --origin_path="/lib/systemd/system/jellyfin.service" +systemctl enable jellyfin.service --quiet + #================================================= # INTEGRATE SERVICE IN YUNOHOST #=================================================