Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] vdr Restarting Tool (cron Job + Perl)
Hi
as my vdr was chrashing a lot in the last days and the watchdog didn't
catch all of them i wrote a little perl script that is startet every 5
minutes by the cron deamon and if ther is no vdr running it restarts
it.
The script itself is included as a attachment. i have tried to comment
it as much as possible so that all of you should be able too
understand what is going on if you want to take a look.
Important to now are the following things.
a) the script asumes that you started ypur vdr with a full path just
as the runvdr script does that. so if you run the followin on the
command line
"ps -ef |grep vdr"
you should get something like
vdrusr 21656 21654 0 02:11 pts/2 00:00:00
/home/vdruser/vdrXyZ/vdr
b) for restarting my script uses the runvdr script so make shure it's
in the dir you configure in the attached checkvdr.pl file.
c) this software is a quick hack and is so far only tested on my
system
d) if you have problems you can mail me, but if i have time to help
you is a totlay other thing so maybe you might have to wait a little
bit ;)
e) you need to put the line below in the crontab of root. That is done
with "crontab -e" and you will have to change the "/root/bin/" part to
whereever you put the script. With this setting the check is done
every 5 mins. if you want it done every 10 minutes just replace 5 with
10. for more info about that you can also execute "man 5 crontab"
*/5 * * * * /root/bin/checkvdr.pl
f) the software is realeased under GPL
d) may your life prosper as long as the force is with you
ciao marks
--
/"\ Markus Kalb <markus.kalb@gmx.de>
\ / GnuPG Key ID B93BDF1E
X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
/ \
-- No attachments (even text) are allowed --
-- Type: application/octet-stream
-- File: checkvdr.pl
Home |
Main Index |
Thread Index