summaryrefslogtreecommitdiff
path: root/debian/postinst
diff options
context:
space:
mode:
authorAndreas Mair <amair.sob@googlemail.com>2005-04-12 12:32:06 +0200
committerAndreas Mair <amair.sob@googlemail.com>2005-04-12 12:32:06 +0200
commit022c4f162d7b83cb287b7d16749899d9e7c4242a (patch)
treeecc7dcf65b3e43713d9ecd36a7982dade2197f8a /debian/postinst
parent0d6ba991052f971564296c537887e030d13ee730 (diff)
downloadvdradmin-am-022c4f162d7b83cb287b7d16749899d9e7c4242a.tar.gz
vdradmin-am-022c4f162d7b83cb287b7d16749899d9e7c4242a.tar.bz2
2005-04-12: 0.97-am3.1v0.97-am3.1
- Updated Spanish i18n (Thanks to Ruediger Jung). - Added VDR Admin man-page (Thanks to Thomas Schmidt). - Improved detection of another running vdradmind.pl at startup (if vdradmind.pid is found but pid is not a vdradmind.pl vdradmin will start anyway). - Added IMDb lookup button in prog_detail (Suggested by Marcus). - Use configured Streamdev port for live streaming. - Added warning when using EPG_DIRECT. - Updated INSTALL file. - Renamed i18n Español to Spanish (Requested by Ruediger Jung). - Fixed ":" & "|" handling in timer's title and summary (Thanks to Der_Pit for pointing me to that). - Added "Select all" to timer/autotimer/recordings list. - Exchanged priority and lifetime textfields in config.html to match order used at other places (Requested by Ruediger Jung). - Added vdradmin-0.95-0.9pre5-email.diff (Author: blafasel) patch: send email on timers added by AutoTimer (needs sendEmail available here: http://caspian.dotconf.net/menu/Software/SendEmail/). - Fixed timer add/edit where date got set wrong in case it has been entered as "yyyy-mm-dd". - Fixed problems when using MOD_GZIP (Thanks Ville Skyttä). - Fixed Makefile once again (Thanks Zzam for pointing me to this). - Added patches submitted by stefan.h (Thanks!): -> New config option EPG_PRUNE. You can set a channel number up to which VDRAdmin will read EPG. Might reduce memory usage and read-in time. Set to "0" to read all channels. -> Optimizations and bug fixes. - Added install files for Debian (Thanks to Steffen Oberle for requesting and troubleshooting).
Diffstat (limited to 'debian/postinst')
-rw-r--r--debian/postinst66
1 files changed, 66 insertions, 0 deletions
diff --git a/debian/postinst b/debian/postinst
new file mode 100644
index 0000000..735d586
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,66 @@
+#!/bin/sh -e
+set -e
+
+TEMPLATE_DIR=/usr/share/vdradmin/template
+
+# Check if there are still cfgfiles in /etc/vdradmin/ and move them
+# to /var/lib/vdradmin
+if [ ! -f /var/lib/vdradmin/vdradmind.conf ]; then
+ if [ -f /etc/vdradmin/vdradmind.conf ]; then
+ mv /etc/vdradmin/vdradmind.conf /var/lib/vdradmin/
+ else
+ cp /usr/share/doc/vdradmin/examples/vdradmind.conf /var/lib/vdradmin/
+ fi
+fi
+
+[ -e /etc/vdradmin/vdradmind.conf ] || ln -s /var/lib/vdradmin/vdradmind.conf \
+/etc/vdradmin/vdradmind.conf
+
+if [ ! -f /var/lib/vdradmin/vdradmind.at ]; then
+ [ ! -f /etc/vdradmin/vdradmind.at ] || mv /etc/vdradmin/vdradmind.at /var/lib/vdradmin/
+fi
+
+# ensure that user and group 'vdradmin' exist
+USER=vdradmin
+GROUP=vdradmin
+if ! getent group | grep -q "^$GROUP:" ; then
+ echo -n "Adding group $GROUP.."
+ addgroup --quiet --system $GROUP
+ echo "..done"
+fi
+if ! getent passwd | grep -q "^$USER:"; then
+ echo -n "Adding user $USER.."
+ adduser --system --home /var/lib/vdradmin --shell /bin/false \
+ --gecos "VDRAdmin user" --no-create-home \
+ --disabled-login --disabled-password \
+ --ingroup $GROUP \
+ $USER
+ echo "...done"
+fi
+
+# ensure vdradmind.at (auto timers) exists
+ATFILE=/var/lib/vdradmin/vdradmind.at
+[ -e $ATFILE ] || touch $ATFILE
+
+# ensure that vdradmin's config files have the correct owner
+[ ! -d /var/lib/vdradmin ] || chown -R $USER:$GROUP /var/lib/vdradmin/
+
+# change the permissions of the cfg-file to 0600
+[ ! -e /var/lib/vdradmin/vdradmind.conf ] || chmod 0600 /var/lib/vdradmin/vdradmind.conf
+
+# change the owner and group of the logfile to vdradmin
+[ ! -e /var/log/vdradmind.log ] || chown $USER:$GROUP /var/log/vdradmind.log
+
+# make auto timer file "read/writeable" by group vdr and config file readable
+# by group "vdr",so that vdr plugins (Autotimeredit plugin) get access
+if getent group | grep -q "^vdr:" ; then
+ if [ -d /var/lib/vdradmin ] ; then
+ chgrp -R vdr /var/lib/vdradmin
+ chmod a=,ug=rwx /var/lib/vdradmin
+ chmod a=,ug=rw $ATFILE
+ CFGFILE=/var/lib/vdradmin/vdradmind.conf
+ [ -e $CFGFILE ] && chmod a=,u=rw,g=r $CFGFILE
+ fi
+fi
+
+##DEBHELPER##