From 74355883639a812c3cfd40fbc45c1af6b70e2c3c Mon Sep 17 00:00:00 2001 From: fram3d Date: Wed, 1 Nov 2023 17:16:25 +0100 Subject: [PATCH] save old config.ini during .deb instalation --- build-deb/luser/DEBIAN/postinst | 2 ++ build-deb/luser/DEBIAN/preinst | 2 ++ build-deb/luser/DEBIAN/prerm | 1 + 3 files changed, 5 insertions(+) create mode 100755 build-deb/luser/DEBIAN/preinst diff --git a/build-deb/luser/DEBIAN/postinst b/build-deb/luser/DEBIAN/postinst index 755f65a..573bb70 100755 --- a/build-deb/luser/DEBIAN/postinst +++ b/build-deb/luser/DEBIAN/postinst @@ -1,3 +1,5 @@ #!/bin/sh /usr/bin/systemctl enable luser.service /sbin/service luser start +cp /tmp/oldluserconfig.ini /var/luser/luser/config.ini +rm /tmp/oldluserconfig.ini diff --git a/build-deb/luser/DEBIAN/preinst b/build-deb/luser/DEBIAN/preinst new file mode 100755 index 0000000..8f060aa --- /dev/null +++ b/build-deb/luser/DEBIAN/preinst @@ -0,0 +1,2 @@ +#!/bin/sh +cp /var/luser/luser/config.ini /tmp/oldluserconfig.ini diff --git a/build-deb/luser/DEBIAN/prerm b/build-deb/luser/DEBIAN/prerm index 3c44ee6..1044fe7 100755 --- a/build-deb/luser/DEBIAN/prerm +++ b/build-deb/luser/DEBIAN/prerm @@ -1,3 +1,4 @@ #!/bin/sh /sbin/service luser stop /usr/bin/systemdctl disable luser.service +cp /var/luser/luser/config.ini /tmp/oldluserconfig.ini