r187 - vdr/vdr/trunk/debian
Thomas Schmidt
pkg-vdr-dvb-changes@lists.alioth.debian.org
Sun, 27 Feb 2005 12:23:21 +0100
Author: tschmidt
Date: 2005-02-27 12:23:21 +0100 (Sun, 27 Feb 2005)
New Revision: 187
Modified:
vdr/vdr/trunk/debian/vdr.init
Log:
Improvements to the init-script, try to check if vdr or vdr-kbd is running... (vdr showes up as /usr/bin/vdr-kbd with the patch from Darren Salt)
Modified: vdr/vdr/trunk/debian/vdr.init
===================================================================
--- vdr/vdr/trunk/debian/vdr.init 2005-02-27 00:37:23 UTC (rev 186)
+++ vdr/vdr/trunk/debian/vdr.init 2005-02-27 11:23:21 UTC (rev 187)
@@ -18,7 +18,10 @@
startvdr()
{
- if ! ps ax | grep "/usr/bin/vdr " | grep -v grep > /dev/null
+ # only start vdr if there is no other instance running
+ # (Appears as vdr-kbd in the official debian-packages
+ # and just as vdr in the c't-vdr packages)
+ if ! ps ax | grep "/usr/bin/\(vdr\|vdr-kbd\) " | grep -qv grep
then
. /usr/lib/vdr/plugin-loader.sh
. /usr/lib/vdr/commands-loader.sh
@@ -37,7 +40,15 @@
stopvdr()
{
killall -q -TERM runvdr
- killall -q -TERM /usr/bin/vdr
+
+ # check if the running process is /usr/bin/vdr or /usr/bin/vdr-kbd
+ if ps ax | grep "/usr/bin/vdr " | grep -qv grep
+ then
+ killall -q -TERM /usr/bin/vdr > /dev/null 2>&1
+ else
+ # (assume that vdr-kbd is running)
+ killall -q -TERM /usr/bin/vdr-kbd > /dev/null 2>&1
+ fi
}
case "$1" in