From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH] minidlna: Add backup capability - bug#12710 Date: Fri, 22 Oct 2021 15:37:27 +0200 Message-ID: <20211022133727.2711169-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1720016173406872226==" List-Id: --===============1720016173406872226== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable - Backup definition missing - created ro backup config file - Update of rootfile - Addition of backup definition install into lfs file - Addition of restore and backup statements into install.sh and uninstall.sh = pak scripts Fixes: 12710 Signed-off-by: Adolf Belka --- config/backup/includes/minidlna | 1 + config/rootfiles/packages/minidlna | 3 ++- lfs/minidlna | 6 +++++- src/paks/minidlna/install.sh | 1 + src/paks/minidlna/uninstall.sh | 1 + 5 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 config/backup/includes/minidlna diff --git a/config/backup/includes/minidlna b/config/backup/includes/minidlna new file mode 100644 index 000000000..e4e69325c --- /dev/null +++ b/config/backup/includes/minidlna @@ -0,0 +1 @@ +/etc/minidlna.conf diff --git a/config/rootfiles/packages/minidlna b/config/rootfiles/packages/m= inidlna index 42a83f8da..12d81de5e 100644 --- a/config/rootfiles/packages/minidlna +++ b/config/rootfiles/packages/minidlna @@ -1,5 +1,5 @@ -etc/rc.d/init.d/minidlna etc/minidlna.conf +etc/rc.d/init.d/minidlna usr/sbin/minidlnad #usr/share/locale/da/LC_MESSAGES/minidlna.mo #usr/share/locale/de/LC_MESSAGES/minidlna.mo @@ -14,3 +14,4 @@ usr/sbin/minidlnad #usr/share/locale/ru/LC_MESSAGES/minidlna.mo #usr/share/locale/sl/LC_MESSAGES/minidlna.mo #usr/share/locale/sv/LC_MESSAGES/minidlna.mo +var/ipfire/backup/addons/includes/minidlna diff --git a/lfs/minidlna b/lfs/minidlna index 822251fcf..a0e09a0a3 100644 --- a/lfs/minidlna +++ b/lfs/minidlna @@ -32,7 +32,7 @@ DL_FROM =3D $(URL_IPFIRE) DIR_APP =3D $(DIR_SRC)/$(THISAPP) TARGET =3D $(DIR_INFO)/$(THISAPP) PROG =3D minidlna -PAK_VER =3D 7 +PAK_VER =3D 8 =20 DEPS =3D ffmpeg flac libexif libid3tag libogg =20 @@ -89,6 +89,10 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) =20 #install initscripts $(call INSTALL_INITSCRIPT,minidlna) +=09 + #install backup definition + install -v -m 644 ${DIR_SRC}/config/backup/includes/minidlna \ + /var/ipfire/backup/addons/includes/minidlna =20 @rm -rf $(DIR_APP) @$(POSTBUILD) diff --git a/src/paks/minidlna/install.sh b/src/paks/minidlna/install.sh index 5080157cd..397d3b193 100644 --- a/src/paks/minidlna/install.sh +++ b/src/paks/minidlna/install.sh @@ -25,6 +25,7 @@ extract_files [ -d /var/mp3 ] || ( mkdir /var/mp3 && chown nobody.nobody /var/mp3 ) =20 +restore_backup ${NAME} start_service ${NAME} =20 ln -svf ../init.d/minidlna /etc/rc.d/rc0.d/K00minidlna diff --git a/src/paks/minidlna/uninstall.sh b/src/paks/minidlna/uninstall.sh index bc5983843..8c8f28e47 100644 --- a/src/paks/minidlna/uninstall.sh +++ b/src/paks/minidlna/uninstall.sh @@ -23,5 +23,6 @@ # . /opt/pakfire/lib/functions.sh stop_service ${NAME} +make_backup ${NAME} remove_files rm -rf /etc/rc.d/rc*.d/*minidlna --=20 2.33.0 --===============1720016173406872226==--