[vdr] Request - an additional exit code
linux at youmustbejoking.demon.co.uk
Sun Mar 26 17:32:20 CEST 2006
I demand that Patrick Gleichmann may or may not have written...
> The current program exit-codes:
> 0 = Help, signal (e.g. kill -HUP)
> 1 = Emergency exit
> 2 = Error during initialization (commandline, config, device...)
> At the moment I have a script, which sends a kill signal to leave the
> endless loop = end vdr. [...]
Make at least N attempts to start vdr and record the start time for each of
the last N attempts. Once N attempts have been made, if the oldest of these
is too recent, stop trying to restart it.
My runvdr does this (see .sig; you want vdr_1.3.44-2.diff.gz).
If you want to do this in shell then something like the following (untested)
should be adequate:
while :; do
# run vdr here
test $(($NOW - $START_1)) -lt 60 && break
| Darren Salt | linux or ds at | nr. Ashington, | Toon
| RISC OS, Linux | youmustbejoking,demon,co,uk | Northumberland | Army
It has just been discovered that research causes cancer in rats.
More information about the vdr