From d0ff8c207f61abaaf20e0b613f872de577bf3fca Mon Sep 17 00:00:00 2001 From: Marcin Haba Date: Sun, 22 Nov 2015 15:28:58 +0100 Subject: [PATCH] baculum: Fix remove users file during upgrade deb packages --- gui/baculum/debian/baculum-apache2.prerm | 12 ++++++++++-- gui/baculum/debian/baculum-lighttpd.prerm | 12 ++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/gui/baculum/debian/baculum-apache2.prerm b/gui/baculum/debian/baculum-apache2.prerm index ff8e5c4255..6553bb49ad 100644 --- a/gui/baculum/debian/baculum-apache2.prerm +++ b/gui/baculum/debian/baculum-apache2.prerm @@ -2,8 +2,16 @@ set -e -rm /usr/share/baculum/htdocs/protected/Data/baculum.users +if [ "$1" = "remove" ] +then + [ ! -e /usr/share/baculum/htdocs/protected/Data/settings.conf ] || + mv /usr/share/baculum/htdocs/protected/Data/settings.conf \ + /usr/share/baculum/htdocs/protected/Data/settings.conf.apache + # remove debug files if any + [ ! -e /usr/share/baculum/htdocs/protected/Data/baculum.dbg ] || + rm /usr/share/baculum/htdocs/protected/Data/baculum*.dbg +fi #DEBHELPER# -exit 0 \ No newline at end of file +exit 0 diff --git a/gui/baculum/debian/baculum-lighttpd.prerm b/gui/baculum/debian/baculum-lighttpd.prerm index ff8e5c4255..c04eb9631c 100644 --- a/gui/baculum/debian/baculum-lighttpd.prerm +++ b/gui/baculum/debian/baculum-lighttpd.prerm @@ -2,8 +2,16 @@ set -e -rm /usr/share/baculum/htdocs/protected/Data/baculum.users +if [ "$1" = "remove" ] +then + [ ! -e /usr/share/baculum/htdocs/protected/Data/settings.conf ] || + mv /usr/share/baculum/htdocs/protected/Data/settings.conf \ + /usr/share/baculum/htdocs/protected/Data/settings.conf.lighttpd + # remove debug files if any + [ ! -e /usr/share/baculum/htdocs/protected/Data/baculum.dbg ] || + rm /usr/share/baculum/htdocs/protected/Data/baculum*.dbg +fi #DEBHELPER# -exit 0 \ No newline at end of file +exit 0 -- 2.39.5