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