summaryrefslogtreecommitdiff
path: root/debian/vdradmin.init
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/vdradmin.init
parent0d6ba991052f971564296c537887e030d13ee730 (diff)
downloadvdradmin-am-0.97-am3.1.tar.gz
vdradmin-am-0.97-am3.1.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/vdradmin.init')
-rw-r--r--debian/vdradmin.init91
1 files changed, 91 insertions, 0 deletions
diff --git a/debian/vdradmin.init b/debian/vdradmin.init
new file mode 100644
index 0000000..24f7a99
--- /dev/null
+++ b/debian/vdradmin.init
@@ -0,0 +1,91 @@
+#! /bin/sh
+#
+#
+# Init-script for vdradmin, created by Thomas Schmidt <thomas.schmidt@in.stud.tu-ilmenau.de>
+#
+#
+
+# Default Settings:
+
+# Username vdradmin should run as:
+USER=vdradmin
+
+# Group under which vdradmin should run:
+GROUP=vdradmin
+
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/bin/vdradmind.pl
+NAME=vdradmin
+DESC="VDR Webadministration interface"
+
+test -x $DAEMON || exit 0
+
+# Include vdradmin defaults if available
+if [ -f /etc/default/vdradmin ] ; then
+ . /etc/default/vdradmin
+fi
+
+test "$ENABLED" != "0" || exit 0
+
+set -e
+
+# Create Temporary Directory
+create_temp ()
+{
+ TEMPDIR=`mktemp -d -p /tmp vdradmin-XXXXXX`
+
+ # Check if the group vdr exists and make vdr
+ # the owner of the temporary directory
+ if getent group | grep -q "^vdr:" ; then
+ chown vdr $TEMPDIR
+ fi
+
+ chgrp vdradmin $TEMPDIR
+ chmod 2770 $TEMPDIR
+}
+
+# Check if the logfile exists allready, if not, create it and set
+# group and owner to $USER:$GROUP
+create_logfile ()
+{
+ LOGFILE="/var/log/vdradmind.log"
+ if [ ! -e $LOGFILE ] ; then
+ touch $LOGFILE
+ chown $USER:$GROUP $LOGFILE
+ fi
+}
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC: "
+ create_temp
+ create_logfile
+ TEMPDIR=$TEMPDIR start-stop-daemon --start \
+ -c $USER:$GROUP -b -m --pidfile /var/run/vdradmin.pid \
+ --exec /usr/bin/vdradmind.pl -- -nf
+ echo "$NAME."
+ ;;
+ stop)
+ echo -n "Stopping $DESC: "
+ start-stop-daemon --stop -q -o --pidfile /var/run/vdradmin.pid
+ echo "$NAME."
+ ;;
+ restart|force-reload)
+ echo -n "Restarting $DESC: "
+ create_temp
+ create_logfile
+ start-stop-daemon --stop -q -o --pidfile /var/run/vdradmin.pid
+ TEMPDIR=$TEMPDIR start-stop-daemon --start \
+ -c $USER:$GROUP -b -m --pidfile /var/run/vdradmin.pid \
+ --exec /usr/bin/vdradmind.pl -- -nf
+ echo "$NAME."
+ ;;
+ *)
+ N=/etc/init.d/$NAME
+ echo "Usage: $N {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0