F
faxe2110
Guest
Hallo,
ich versuche seit geraumer Zeit meine crontab jobs zum laufen zu bekommen. Nur leider will keiner von denen etwas machen.
Ich gehe mit crontab -e rein und habe folgendes gesetzt.
#Reboot
0 4 * * * root /etc/init.d/reboot #Reboot Server
#Zeitabgleich -> benoetigt [apt-get install ntpdate]
0 8 * * * root ntpdate -s pool.ntp.org #Zeitabgleich (Taeglich um 08:00 $
#CCcam Restart
* 5 * * * root /emu/script/cccam.sh #Taeglich um 05:00 CCcam Restart
Reboot script
CCcam Restart
Kann mir jemand dabei helfen ??
Faxe2110
ich versuche seit geraumer Zeit meine crontab jobs zum laufen zu bekommen. Nur leider will keiner von denen etwas machen.
Ich gehe mit crontab -e rein und habe folgendes gesetzt.
#Reboot
0 4 * * * root /etc/init.d/reboot #Reboot Server
#Zeitabgleich -> benoetigt [apt-get install ntpdate]
0 8 * * * root ntpdate -s pool.ntp.org #Zeitabgleich (Taeglich um 08:00 $
#CCcam Restart
* 5 * * * root /emu/script/cccam.sh #Taeglich um 05:00 CCcam Restart
Reboot script
#! /bin/sh
### BEGIN INIT INFO
# Provides: reboot
# Required-Start:
# Required-Stop:
# Default-Start:
# Default-Stop: 6
# Short-Description: Execute the reboot command.
# Description:
### END INIT INFO
PATH=/sbin:/usr/sbin:/bin:/usr/bin
. /lib/lsb/init-functions
do_stop () {
# Message should end with a newline since kFreeBSD may
# print more stuff (see #323749)
log_action_msg "Will now restart"
reboot -d -f -i
}
case "$1" in
start)
# No-op
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
do_stop
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac
### BEGIN INIT INFO
# Provides: reboot
# Required-Start:
# Required-Stop:
# Default-Start:
# Default-Stop: 6
# Short-Description: Execute the reboot command.
# Description:
### END INIT INFO
PATH=/sbin:/usr/sbin:/bin:/usr/bin
. /lib/lsb/init-functions
do_stop () {
# Message should end with a newline since kFreeBSD may
# print more stuff (see #323749)
log_action_msg "Will now restart"
reboot -d -f -i
}
case "$1" in
start)
# No-op
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
do_stop
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac
CCcam Restart
#Setting variables
CAMNAME="CCcam Server"
CAMDIR="/emu/cccam"
LOGDIR="/emu/log"
# end
# Checking what CCcam version is used on this computer.
if [ ! -f $CAMDIR/CCcam.x86_64 ]
then
CAM="CCcam.x86"
else
CAM="CCcam.x86_64"
fi
# Checking for pid file existance
if [ ! -f $CAMDIR/cccam.pid ]
then
echo "No pidfile exists, Creating PID for CCcam"
else
rm $CAMDIR/cccam.pid
echo "Pidfile allready found, Removing old pidfile"
fi
pidof $CAM > $CAMDIR/cccam.pid
PID=$(exec cat $CAMDIR/cccam.pid)
# This method starts CCcam
start_cam ()
{
$CAMDIR/$CAM -dv >> /$LOGDIR/debug.txt &
sleep 5
}
# This method stops CCcam
stop_cam ()
{
kill -9 $PID
sleep 5
}
case "$1" in
start)
echo "[SCRIPT] $1: $CAMNAME"
start_cam
;;
stop)
echo "[SCRIPT] $1: $CAMNAME"
stop_cam
;;
restart)
echo "Restarting $CAMNAME"
stop_cam
start_cam
;;
*)
"$0" stop
exit 1
;;
esac
exit 0
CAMNAME="CCcam Server"
CAMDIR="/emu/cccam"
LOGDIR="/emu/log"
# end
# Checking what CCcam version is used on this computer.
if [ ! -f $CAMDIR/CCcam.x86_64 ]
then
CAM="CCcam.x86"
else
CAM="CCcam.x86_64"
fi
# Checking for pid file existance
if [ ! -f $CAMDIR/cccam.pid ]
then
echo "No pidfile exists, Creating PID for CCcam"
else
rm $CAMDIR/cccam.pid
echo "Pidfile allready found, Removing old pidfile"
fi
pidof $CAM > $CAMDIR/cccam.pid
PID=$(exec cat $CAMDIR/cccam.pid)
# This method starts CCcam
start_cam ()
{
$CAMDIR/$CAM -dv >> /$LOGDIR/debug.txt &
sleep 5
}
# This method stops CCcam
stop_cam ()
{
kill -9 $PID
sleep 5
}
case "$1" in
start)
echo "[SCRIPT] $1: $CAMNAME"
start_cam
;;
stop)
echo "[SCRIPT] $1: $CAMNAME"
stop_cam
;;
restart)
echo "Restarting $CAMNAME"
stop_cam
start_cam
;;
*)
"$0" stop
exit 1
;;
esac
exit 0
Kann mir jemand dabei helfen ??
Faxe2110