vdr/vdr/debian vdr.init
Tobias Grimm
pkg-vdr-dvb-changes@lists.alioth.debian.org
Sat, 24 Apr 2004 14:20:15 +0000
Update of /cvsroot/pkg-vdr-dvb/vdr/vdr/debian
In directory haydn:/tmp/cvs-serv12454
Modified Files:
vdr.init
Log Message:
removed some code duplication
Index: vdr.init
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/vdr.init,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- vdr.init 21 Apr 2004 14:19:07 -0000 1.1.1.1
+++ vdr.init 24 Apr 2004 14:20:12 -0000 1.2
@@ -18,30 +18,36 @@
test -x /usr/sbin/runvdr || exit 0
+startvdr()
+{
+ start-stop-daemon --start --quiet \
+ --exec /usr/sbin/runvdr -- $DAEMON \
+ -v $VIDEO_DIR -c $CFG_DIR $OPTIONS \
+ $PLUGINS &
+}
+
+stopvdr()
+{
+ killall -q -TERM runvdr
+ killall -q -TERM $DAEMON
+}
+
case "$1" in
start)
echo -n "Starting $DESC: $NAME"
- start-stop-daemon --start --quiet \
- --exec /usr/sbin/runvdr -- $DAEMON \
- -v $VIDEO_DIR -c $CFG_DIR $OPTIONS \
- $PLUGINS &
+ startvdr
echo "."
;;
stop)
echo -n "Stopping $DESC: $NAME "
- killall -q -TERM runvdr
- killall -q -TERM $DAEMON
+ stopvdr
echo "."
;;
restart|force-reload)
echo -n "Restarting $DESC: $NAME "
- killall -q -TERM runvdr
- killall -q -TERM $DAEMON
+ stopvdr
sleep 4
- start-stop-daemon --start --quiet \
- --exec /usr/sbin/runvdr -- $DAEMON \
- -v $VIDEO_DIR -c $CFG_DIR $OPTIONS \
- $PLUGINS &
+ startvdr
echo "."
;;
*)