AW: Cccam für ALIX
Also bei mir schaut die crontab anders aus:
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
*/5 * * * * root /CCcam/script/./CCcamTest.sh
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#
und das CCcamtest.sh folgendermassen:
#!bin/sh
CCCAMPATH="/CCcam/bin"
CCCAMNAME="CCcam.x86"
TELNETPORT="16000"
LOGFILE="CCcam_restart_log.txt"
echo info|nc localhost $TELNETPORT>>/tmp/check.txt
set $(ls -s /tmp/check.txt)
if [ "$1" = "0" ];
then
echo $(date "+%d.%m.%y|%H:%M:%S|CCcam makes a restart")>>/CCcam/log/$LOGFILE
$CCCAMPATH/$CCCAMNAME restart
else
echo "all fine
"
fi
rm /tmp/check.txt
exit 0
ich finde da keinen fehler?