1
0
mirror of https://github.com/agdsn/ancient-weatherstation.git synced 2026-06-19 23:07:59 +00:00
Files
ancient-weatherstation/debian/weatherstation-chart.postinst
T
losinshi d8192b9d06 fixing
git-svn-id: file:///home/jan/tmp/wetterstation/trunk@181 dd492736-c11a-0410-ad51-8c26713eaf7f
2006-09-28 01:29:32 +00:00

35 lines
1.0 KiB
Bash

#!/bin/sh
#DEBHELPER#
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
if [ -e /etc/weatherstation/frontend.conf ]; then
LINKNAME="/usr/share/weatherstation-frontend/$(grep default_chart_dir /etc/weatherstation/frontend.conf | cut -f 2 -d "'" | cut -f 2 -d '"')"
if [ ! -e $LINKNAME ]; then
LINKTARGET=$(grep dflt_image_location /etc/weatherstation/chart.conf | cut -f2)
if [ -e $LINKTARGET ]; then
echo -n "Lege Link zu den Bildern an ... "
/bin/ln -s -f $LINKTARGET $LINKNAME
echo "done"
fi
fi
fi
# Fixperms:
/bin/chown weatherstation:weatherstation /etc/weatherstation/chart.conf
/bin/chmod 440 /etc/weatherstation/chart.conf
/bin/chown weatherstation:www-data /var/cache/weatherstation-chart
/bin/chmod 750 /var/cache/weatherstation-chart
/usr/bin/fc-cache