From 3c5b11abbb9c0897eedcc7506af804c62093ec66 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 17 Jan 2010 12:45:44 +0100 Subject: Renamed 'runvdr' to 'runvdr.template' and no longer copying it to the BINDIR in 'make install' --- CONTRIBUTORS | 2 ++ HISTORY | 2 ++ INSTALL | 11 +++++---- Makefile | 4 ++-- runvdr | 61 ------------------------------------------------- runvdr.template | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 83 insertions(+), 68 deletions(-) delete mode 100755 runvdr create mode 100755 runvdr.template diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 4ab11a85..249546b1 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1562,6 +1562,8 @@ Martin Dauskardt recorded for suggesting to add a table of the used trick speed values to the description of cDevice::TrickSpeed() + for renaming 'runvdr' to 'runvdr.template' and no longer copying it to the BINDIR + in 'make install' Maynard Cedric for reporting a problem in handling the color button texts in cMenuEditStrItem diff --git a/HISTORY b/HISTORY index 9ab71fb3..febccc8d 100644 --- a/HISTORY +++ b/HISTORY @@ -6285,3 +6285,5 @@ Video Disk Recorder Revision History - Updated the Italian OSD texts (thanks to Diego Pierotto). - If svdrphosts.conf contains only the address of the local host, the SVDRP port is opened only for the local host (thanks to Manuel Reimer). +- Renamed 'runvdr' to 'runvdr.template' and no longer copying it to the BINDIR + in 'make install' (thanks to Martin Dauskardt). diff --git a/INSTALL b/INSTALL index 3af62d77..e0fc016a 100644 --- a/INSTALL +++ b/INSTALL @@ -121,8 +121,12 @@ Users who want to set the default character set to something different can do this by setting the environment variable VDR_CHARSET_OVERRIDE to something like ISO-8859-9. -Automatic restart in case of hangups: -------------------------------------- +Start script with automatic restart in case of hangups: +------------------------------------------------------- + +The VDR source directory contains a 'runvdr.template'. Just copy it as 'runvdr' +into your /usr/bin or /usr/local/bin directory and adjust it to your particular +requirements. (See the comments inside the script for more information.) If you run VDR using the 'runvdr' shell script it will use the built-in watchdog timer to restart the program in case something happens that @@ -131,9 +135,6 @@ call to the VDR program, be sure to NOT use the '-d' option! Otherwise VDR will go into 'daemon' mode and the initial program call will return immediately! 'runvdr' needs to be started as user 'root'. Use the '-u' option to run the actual 'vdr' program under a different user id. -Note that the 'runvdr' script needs to be adjusted to your particular -requirements before you can actually use it. See the comments inside -the script for more information. Setting the system time: ------------------------ diff --git a/Makefile b/Makefile index 1901fa2d..01408cb1 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ # See the main source file 'vdr.c' for copyright information and # how to reach the author. # -# $Id: Makefile 2.5 2009/12/31 15:36:00 kls Exp $ +# $Id: Makefile 2.6 2010/01/17 12:32:18 kls Exp $ .DELETE_ON_ERROR: @@ -164,7 +164,7 @@ install: install-bin install-conf install-doc install-plugins install-i18n install-bin: vdr @mkdir -p $(DESTDIR)$(BINDIR) - @cp --remove-destination vdr runvdr svdrpsend.pl $(DESTDIR)$(BINDIR) + @cp --remove-destination vdr svdrpsend.pl $(DESTDIR)$(BINDIR) # Configuration files: diff --git a/runvdr b/runvdr deleted file mode 100755 index 96c95bf2..00000000 --- a/runvdr +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/sh - -# runvdr: Loads the DVB driver and runs VDR -# -# If VDR exits abnormally, the driver will be reloaded -# and VDR restarted. -# -# In order to actually use this script you need to implement -# the functions DriverLoaded(), LoadDriver() and UnloadDriver() -# and maybe adjust the VDRPRG and VDRCMD to your particular -# requirements. -# -# Since this script loads the DVB driver, it must be started -# as user 'root'. Add the option "-u username" to run VDR -# under the given user name. -# -# Any command line parameters will be passed on to the -# actual 'vdr' program. -# -# See the main source file 'vdr.c' for copyright information and -# how to reach the author. -# -# $Id: runvdr 1.19 2006/05/14 16:02:05 kls Exp $ - -VDRPRG="./vdr" -VDRCMD="$VDRPRG -w 60 $*" - -KILL="/usr/bin/killall -q -TERM" - -# Detect whether the DVB driver is already loaded -# and return 0 if it *is* loaded, 1 if not: -function DriverLoaded() -{ - return 1 -} - -# Load all DVB driver modules needed for your hardware: -function LoadDriver() -{ -} - -# Unload all DVB driver modules loaded in LoadDriver(): -function UnloadDriver() -{ -} - -# Load driver if it hasn't been loaded already: -if ! DriverLoaded; then - LoadDriver - fi - -while (true) do - eval "$VDRCMD" - if test $? -eq 0 -o $? -eq 2; then exit; fi - echo "`date` reloading DVB driver" - $KILL $VDRPRG - sleep 10 - UnloadDriver - LoadDriver - echo "`date` restarting VDR" - done diff --git a/runvdr.template b/runvdr.template new file mode 100755 index 00000000..ebc2f04d --- /dev/null +++ b/runvdr.template @@ -0,0 +1,71 @@ +#!/bin/sh + +# runvdr: Loads the DVB driver and runs VDR +# +# If VDR exits abnormally, the driver will be reloaded +# and VDR restarted. +# +# In order to actually use this script you need to implement +# the functions DriverLoaded(), LoadDriver() and UnloadDriver() +# and maybe adjust the VDRPRG and VDRCMD to your particular +# requirements. +# +# Since this script loads the DVB driver, it must be started +# as user 'root'. Add the option "-u username" to run VDR +# under the given user name. +# +# Any command line parameters will be passed on to the +# actual 'vdr' program. +# +# See the main source file 'vdr.c' for copyright information and +# how to reach the author. +# +# $Id: runvdr.template 2.1 2010/01/17 12:39:27 kls Exp $ + +VDRPRG="./vdr" + +VDROPTIONS="-w 60" +# For other options see manpage vdr.1 + +VDRPLUGINS="" +# You will need to select your output device plugin if you want +# to use VDR to watch video. For instance, for a "Full Featured" +# DVB card that would be +# VDRPLUGINS="-P dvbsddevice" + +VDRCMD="$VDRPRG $VDROPTIONS $VDRPLUGINS $*" + +KILL="/usr/bin/killall -q -TERM" + +# Detect whether the DVB driver is already loaded +# and return 0 if it *is* loaded, 1 if not: +function DriverLoaded() +{ + return 1 +} + +# Load all DVB driver modules needed for your hardware: +function LoadDriver() +{ +} + +# Unload all DVB driver modules loaded in LoadDriver(): +function UnloadDriver() +{ +} + +# Load driver if it hasn't been loaded already: +if ! DriverLoaded; then + LoadDriver + fi + +while (true) do + eval "$VDRCMD" + if test $? -eq 0 -o $? -eq 2; then exit; fi + echo "`date` reloading DVB driver" + $KILL $VDRPRG + sleep 10 + UnloadDriver + LoadDriver + echo "`date` restarting VDR" + done -- cgit v1.2.3