View Full Version : Auto Restart DM500
Hi,
How can i add auto-restart in DB500? OpenPLI has Cron?
Lukasz
add as file reboot_timer.sh in map /var/script (chmod 755!!)
#!/bin/sh
strHour="04"
strMin="00"
while true
do
DateSTR=`date +%H%M%S`
#echo "$DateSTR"
if [ "$DateSTR" -ge "$strHour$strMin"00 ] && [ "$DateSTR" -le "$strHour$strMin"10 ]; then
echo "its time to reboot"
#shutdown -r now
reboot
exit 0
else
#echo "do sleeping"
sleep 8
fi
done
Add as inadyn_script.sh in map /var/script/
DYN_SYSTEM=dyndns@dyndns.org
/var/script/reboot_timer.sh &
test -f $DAEMON || exit 0
set -e
Reboot the dreambox and it should now auto reboot every night at 04 00
http://www.mediafire.com/?a2w80r1p9e4igke
ok, thank you :) i musn't add this to cron? it's auto running? can i have 2 reboot in one day?
04:00 and 20:00?
that will not go so it will require a 2nd process
perhaps someone has an idea
it's not running :( i set 20:00 and DB wasn't reboot :(
try this:
look at /var/script ..there is a crond_script.sh
edit like this
crond_on=1
then
make folders in var/etc/
named cron,and inside 1 more named crontabs
it have to look like this
/var/etc/cron/crontabs/root
put file named "root"
* 4 * * * reboot
restart every day at 4am!
Ok, i mage file "root" in var/etc/cron/crontabs and write in this.
In var/script i have:
- crond_script.sh: crond_on=1
- reebot_timer.sh:
#!/bin/sh
strHour="20"
strMin="00"
while true
do
DateSTR=`date +%H%M%S`
#echo "$DateSTR"
if [ "$DateSTR" -ge "$strHour$strMin"00 ] && [ "$DateSTR" -le "$strHour$strMin"10 ]; then
echo "its time to reboot"
#shutdown -r now
reboot
exit 0
else
#echo "do sleeping"
sleep 8
fi
done
- inadyn_script.sh:
DYN_SYSTEM=dyndns@dyndns.org
/var/script/reboot_timer.sh &
test -f $DAEMON || exit 0
set -e
and it's not running:(
no
/var/etc/cron/crontabs/root
this
* 4 * * * reboot
crond is started automatically on boot?
try it so again
- telnet to connect
- root@dream: echo "* 4 * * * /sbin/reboot" >> /etc/cron/crontabs/root
reboot
- root@dream: /etc/init.d/busybox-cron stop
- root@dream: /etc/init.d/busybox-cron start
i have error: cannon create /etc/cron/crontabs/root: Directory nonexist :(
look here
http://www.cardsharing.ws/cardsharing/showthread.php?32128-einfaches-CCcam-restart-Script
try this
Powered by vBulletin® Version 4.1.12 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.