From e52a3e0080752a780369f20d5e66e337f887ad35 Mon Sep 17 00:00:00 2001 From: losinshi Date: Wed, 27 Sep 2006 23:02:25 +0000 Subject: [PATCH] package-fixes git-svn-id: file:///home/jan/tmp/wetterstation/trunk@175 dd492736-c11a-0410-ad51-8c26713eaf7f --- debian/weatherstation-chart.cron.d | 2 +- debian/weatherstation-chart.postinst | 6 +++--- debian/weatherstation-checksensor.cron.d | 2 +- debian/weatherstation-checksensor.postinst | 2 +- debian/weatherstation-frontend.postinst | 10 ++++++++++ debian/weatherstation-weatherd.postinst | 3 ++- debian/weatherstation-weatherd.postrm | 1 + 7 files changed, 19 insertions(+), 7 deletions(-) diff --git a/debian/weatherstation-chart.cron.d b/debian/weatherstation-chart.cron.d index 808a0d2..67ad50c 100644 --- a/debian/weatherstation-chart.cron.d +++ b/debian/weatherstation-chart.cron.d @@ -1,4 +1,4 @@ # # Regular cron jobs for the weatherstation package # -*/15 * * * * weatherstation /usr/bin/chart +*/15 * * * * weatherstation /usr/bin/weather_chart diff --git a/debian/weatherstation-chart.postinst b/debian/weatherstation-chart.postinst index d271efa..039580c 100644 --- a/debian/weatherstation-chart.postinst +++ b/debian/weatherstation-chart.postinst @@ -6,7 +6,7 @@ if ! getent passwd weatherstation >/dev/null 2>&1; then echo -n "Creating user/group 'weatherstation'" >&2 adduser --quiet --system --group --no-create-home \ --disabled-password --disabled-login \ - --shell /bin/false --ingroup dailout \ + --shell /bin/false \ weatherstation echo "." fi @@ -20,6 +20,8 @@ if [ -e /etc/weatherstation/frontend.conf ]; then echo -n "Lege Link zu den Bildern an ... " /bin/ln -s -f $LINKTARGET $LINKNAME echo "done" + /bin/chown weatherstation:www-data $LINKTARGET + /bin/chmod 750 $LINKTARGET fi fi fi @@ -28,5 +30,3 @@ fi /bin/chown weatherstation:weatherstation /etc/weatherstation/chart.conf /bin/chmod 440 /etc/weatherstation/chart.conf -/bin/chown weatherstation:www-data $LINKTARGET -/bin/chmod 750 $LINKTARGET diff --git a/debian/weatherstation-checksensor.cron.d b/debian/weatherstation-checksensor.cron.d index dc5b227..168f4f4 100644 --- a/debian/weatherstation-checksensor.cron.d +++ b/debian/weatherstation-checksensor.cron.d @@ -1,4 +1,4 @@ # # Regular cron jobs for the weatherstation package # -*/15 * * * * weatherstation /usr/bin/checksensor +0 12 * * * weatherstation /usr/bin/weather_checksensor diff --git a/debian/weatherstation-checksensor.postinst b/debian/weatherstation-checksensor.postinst index 6f22d9b..2ca6af1 100644 --- a/debian/weatherstation-checksensor.postinst +++ b/debian/weatherstation-checksensor.postinst @@ -6,7 +6,7 @@ if ! getent passwd weatherstation >/dev/null 2>&1; then echo -n "Creating user/group 'weatherstation'" >&2 adduser --quiet --system --group --no-create-home \ --disabled-password --disabled-login \ - --shell /bin/false --ingroup dailout + --shell /bin/false \ weatherstation echo "." fi diff --git a/debian/weatherstation-frontend.postinst b/debian/weatherstation-frontend.postinst index 0cb5d13..2978b05 100644 --- a/debian/weatherstation-frontend.postinst +++ b/debian/weatherstation-frontend.postinst @@ -20,10 +20,20 @@ if [ -e /etc/weatherstation/chart.conf ]; then echo -n "Lege Link zu den Bildern an ... " /bin/ln -s -f $LINKTARGET $LINKNAME echo "done" + /bin/chown weatherstation:www-data $LINKTARGET + /bin/chmod 750 $LINKTARGET fi fi fi +if ! getent passwd weatherstation >/dev/null 2>&1; then + echo -n "Creating user/group 'weatherstation'" >&2 + adduser --quiet --system --group --no-create-home \ + --disabled-password --disabled-login \ + --shell /bin/false \ + weatherstation + echo "." +fi # Fixperms: /bin/chown weatherstation:www-data /etc/weatherstation/frontend.conf diff --git a/debian/weatherstation-weatherd.postinst b/debian/weatherstation-weatherd.postinst index 12dee0f..12d2fb8 100644 --- a/debian/weatherstation-weatherd.postinst +++ b/debian/weatherstation-weatherd.postinst @@ -6,8 +6,9 @@ if ! getent passwd weatherstation >/dev/null 2>&1; then echo -n "Creating user/group 'weatherstation'" >&2 adduser --quiet --system --group --no-create-home \ --disabled-password --disabled-login \ - --shell /bin/false --ingroup dailout \ + --shell /bin/false \ weatherstation + adduser weatherstation dailout echo "." fi diff --git a/debian/weatherstation-weatherd.postrm b/debian/weatherstation-weatherd.postrm index 7813d25..3f881a6 100644 --- a/debian/weatherstation-weatherd.postrm +++ b/debian/weatherstation-weatherd.postrm @@ -4,6 +4,7 @@ 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" fi