From b2ceb0edb628cee0eeb7663a200c5327bb7fd681 Mon Sep 17 00:00:00 2001 From: losinshi Date: Fri, 29 Sep 2006 20:10:06 +0000 Subject: [PATCH] last Bugfixes git-svn-id: file:///home/jan/tmp/wetterstation/trunk@188 dd492736-c11a-0410-ad51-8c26713eaf7f --- debian/weatherstation-chart.postrm | 11 ++++++----- debian/weatherstation-checksensor.postrm | 10 ++++++---- debian/weatherstation-frontend.postrm | 12 ++++++++++++ debian/weatherstation-weatherd.postrm | 13 ++++++++----- 4 files changed, 32 insertions(+), 14 deletions(-) create mode 100644 debian/weatherstation-frontend.postrm diff --git a/debian/weatherstation-chart.postrm b/debian/weatherstation-chart.postrm index e9652f0..c85c17c 100644 --- a/debian/weatherstation-chart.postrm +++ b/debian/weatherstation-chart.postrm @@ -1,11 +1,12 @@ #!/bin/sh #DEBHELPER# - -if getent passwd weatherstation >/dev/null 2>&1; then - echo -n "delete user weatherstation ... " - deluser --quiet weatherstation 2>/dev/null || true - echo "done" +if ( [ ! -e /etc/weatherstation/checksensor.conf ] && [ ! -e /etc/weatherstation/weatherd.conf ] && [ ! -e /etc/weatherstation/frontend.conf ] ); then + if getent passwd weatherstation >/dev/null 2>&1; then + echo -n "delete user weatherstation ... " + deluser --quiet weatherstation 2>/dev/null || true + echo "done" + fi fi if [ -e /etc/weatherstation/frontend.conf ]; then diff --git a/debian/weatherstation-checksensor.postrm b/debian/weatherstation-checksensor.postrm index 7813d25..2564e24 100644 --- a/debian/weatherstation-checksensor.postrm +++ b/debian/weatherstation-checksensor.postrm @@ -2,8 +2,10 @@ #DEBHELPER# -if getent passwd weatherstation >/dev/null 2>&1; then - echo -n "delete user weatherstation ... " - deluser --quiet weatherstation 2>/dev/null || true - echo "done" +if ( [ ! -e /etc/weatherstation/chart.conf ] && [ ! -e /etc/weatherstation/weatherd.conf ] && [ ! -e /etc/weatherstation/frontend.conf ] ); then + if getent passwd weatherstation >/dev/null 2>&1; then + echo -n "delete user weatherstation ... " + deluser --quiet weatherstation 2>/dev/null || true + echo "done" + fi fi diff --git a/debian/weatherstation-frontend.postrm b/debian/weatherstation-frontend.postrm new file mode 100644 index 0000000..ee5833c --- /dev/null +++ b/debian/weatherstation-frontend.postrm @@ -0,0 +1,12 @@ +#!/bin/sh + +#DEBHELPER# +if ( [ ! -e /etc/weatherstation/checksensor.conf ] && [ ! -e /etc/weatherstation/weatherd.conf ] && [ ! -e /etc/weatherstation/chart.conf ] ); then + if getent passwd weatherstation >/dev/null 2>&1; then + echo -n "delete user weatherstation ... " + deluser --quiet weatherstation 2>/dev/null || true + echo "done" + fi +fi + + diff --git a/debian/weatherstation-weatherd.postrm b/debian/weatherstation-weatherd.postrm index 3f881a6..3766356 100644 --- a/debian/weatherstation-weatherd.postrm +++ b/debian/weatherstation-weatherd.postrm @@ -2,9 +2,12 @@ #DEBHELPER# -if getent passwd weatherstation >/dev/null 2>&1; then - echo -n "delete user weatherstation ... " - deluser --quiet weatherstation dailout 2>/dev/null || true - deluser --quiet weatherstation 2>/dev/null || true - echo "done" +deluser --quiet weatherstation dailout 2>/dev/null || true + +if ( [ ! -e /etc/weatherstation/chart.conf ] && [ ! -e /etc/weatherstation/checksensor.conf ] && [ ! -e /etc/weatherstation/frontend.conf ] ); then + if getent passwd weatherstation >/dev/null 2>&1; then + echo -n "delete user weatherstation ... " + deluser --quiet weatherstation 2>/dev/null || true + echo "done" + fi fi