packaging

git-svn-id: file:///home/jan/tmp/wetterstation/trunk@145 dd492736-c11a-0410-ad51-8c26713eaf7f
This commit is contained in:
losinshi 2006-09-27 12:01:56 +00:00
parent 1f9446c451
commit 1a37644c52
9 changed files with 122 additions and 0 deletions

26
debian/weatherstation-chart.postinst vendored Normal file
View File

@ -0,0 +1,26 @@
#!/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

18
debian/weatherstation-chart.postrm vendored Normal file
View File

@ -0,0 +1,18 @@
#!/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"
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
echo -n "Lösche Bilderlink ... "
/bin/rm -f $LINKNAME
echo "done"
fi
fi

13
debian/weatherstation-chart.prerm vendored Normal file
View File

@ -0,0 +1,13 @@
#!/bin/sh
#DEBHELPER#
IMGDIR=$(grep dflt_image_location /etc/weatherstation/chart.conf | cut -f2)
FILES=$(ls -Al $IMGDIR | wc -l)
if [ $FILES -gt 1 ]; then
echo -n "lösche $[$FILES - 1] generierte Bilder ... "
/bin/rm -f $IMGDIR/*
echo "done"
fi

View File

@ -0,0 +1,11 @@
#!/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

View File

@ -0,0 +1,9 @@
#!/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"
fi

View File

@ -11,4 +11,17 @@ echo "# nach! #"
echo "####################################################" echo "####################################################"
echo "" echo ""
if [ -e /etc/weatherstation/chart.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
#DEBHELPER# #DEBHELPER#

12
debian/weatherstation-frontend.prerm vendored Normal file
View File

@ -0,0 +1,12 @@
#!/bin/sh
#DEBHELPER#
if [ -e /etc/weatherstation/chart.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
echo -n "Lösche Bilderlink ... "
/bin/rm -f $LINKNAME
echo "done"
fi
fi

11
debian/weatherstation-weatherd.postinst vendored Normal file
View File

@ -0,0 +1,11 @@
#!/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

9
debian/weatherstation-weatherd.postrm vendored Normal file
View File

@ -0,0 +1,9 @@
#!/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"
fi