33 lines
1.0 KiB
Bash
33 lines
1.0 KiB
Bash
#!/bin/sh
|
|
# weatherstation-frontend postinst
|
|
|
|
echo ""
|
|
echo "####################################################"
|
|
echo "# Achtung: #"
|
|
echo "# Bitte lesen Sie die Anleitung zur weiteren #"
|
|
echo "# Installation unter: #"
|
|
echo "# /usr/share/doc/weatherstation-frontend/reademe #"
|
|
echo "# nach! #"
|
|
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
|
|
|
|
|
|
# Fixperms:
|
|
/bin/chown weatherstation:www-data /etc/weatherstation/frontend.conf
|
|
/bin/chmod 440 /etc/weatherstation/frontend.conf
|
|
|
|
#DEBHELPER#
|