Eurocardsharing

Go Back   Eurocardsharing > Sharing receivers > DreamBox > Setting Dream

Setting Dream Discussion, DM800 and crontab at DreamBox forum; Hello i am trying to enable crond on my DM 800 and have some issues. on the blue panel - ...

Reply
 
LinkBack Thread Tools Display Modes
DM800 and crontab
Old
  (#1)
gcool
Member
 
gcool's Avatar
 
Offline
Posts: 60

Level: 6 [♥ Bé-Yêu ♥♥ Bé-Yêu ♥♥ Bé-Yêu ♥♥ Bé-Yêu ♥]
Life: 0 / 140
Magic: 20 / 3679
Experience: 62%

Thanks: 19
Thanked 13 Times in 10 Posts
Join Date: Jan 2009
Question DM800 and crontab - 19-May-2009, 17:36

Hello

i am trying to enable crond on my DM 800 and have some issues.
on the blue panel - in the daemons section, i can see it green but "stopped".

when i look at /usr/script/crond_script.sh
the parameters are:

CROND_ON=1
NAME=crond
ARGS="-c /var/spool/cron/crontabs -S"
DAEMON=/usr/sbin/crond


if i run the command crontab -l for example, i get an error that /var/spool/cron/crontabs is empty.
in fact the crontabs are created in /etc/cron/crontabs properly with a file called "root" containing the commands i want to run.

so my questions are:
1 - how do i get crond automatically started?
2 - how do i get the crontabs in /var/spool instead of /etc?

i tried to change the ARGS line in the script but when i reboot it comes back

thx for ur help

G-


DM800 HD PVR
Gemini2 ver 4.1 - WD-250GB SATA internal


Use the THANKS button if you are happy with the post
   
Reply With Quote
Old
  (#2)
jakas
ECS Master
 
jakas's Avatar
 
Offline
Posts: 1,227

Level: 30 [♥ Bé-Yêu ♥♥ Bé-Yêu ♥♥ Bé-Yêu ♥♥ Bé-Yêu ♥♥ Bé-Yêu ♥]
Life: 0 / 736
Magic: 409 / 21860
Experience: 47%

Thanks: 320
Thanked 283 Times in 210 Posts
Join Date: Oct 2007
19-May-2009, 18:30

u need to add a script in var/script chmod 755 and then choose that fron crontab.
Put below details in a folder and put in var/script. This is for all Gemini images


#!/bin/sh
clear

cd /var/bin
killall CCcam_2.1.1
CCcam_2.1.1 &

sleep 2
exit 0
   
Reply With Quote
Sponsored Links
Old
  (#3)
gcool
Member
 
gcool's Avatar
 
Offline
Posts: 60

Level: 6 [♥ Bé-Yêu ♥♥ Bé-Yêu ♥♥ Bé-Yêu ♥♥ Bé-Yêu ♥]
Life: 0 / 140
Magic: 20 / 3679
Experience: 62%

Thanks: 19
Thanked 13 Times in 10 Posts
Join Date: Jan 2009
19-May-2009, 18:42

hi,

i did that.
in DM800 its under /usr/script but same idea.

my crond daemon is not running when i reboot
I am kind of stuck

G-



i don't get it !!!
after rebooting my DM800, the cron deamon is NOT running.
So when i try to list my crontabs, i get:
[email protected]:~# crontab -l
crontab: cannot change dir to /var/spool/cron/crontabs: No such file or directory
[email protected]:~#

any help appreciated
G-


DM800 HD PVR
Gemini2 ver 4.1 - WD-250GB SATA internal


Use the THANKS button if you are happy with the post

Last edited by gcool; 20-May-2009 at 09:56.. Reason: Automerged Doublepost
   
Reply With Quote
Old
  (#4)
LeFit
Junior Member
 
LeFit's Avatar
 
Offline
Posts: 19

Level: 3 [♥ Bé-Yêu ♥♥ Bé-Yêu ♥]
Life: 0 / 52
Magic: 6 / 1460
Experience: 9%

Thanks: 11
Thanked 1 Time in 1 Post
Join Date: May 2008
21-May-2009, 01:14

Hi gcool

I don't know anything about linux, but I compared your code with the one I've on my DM800 - where it's running.

I find in /usr/script/crond_script.sh :
Code:
CROND_ON=1
NAME=crond
ARGS="-c /etc/cron/crontabs"
DAEMON=/usr/sbin/crond
and the file called root is actually in the same folder as mentioned in the ARGS line.

So I suggest you
* or to change your ARGS line as mine is
* or you create the /var/spool/cron/crontabs folder hierarchy (level by level) and create (or move) your file called root there


LeFit
DM800HD, Newnigma, CCcam 2.3.0
   
Reply With Quote
The Following User Says Thank You to LeFit For This Useful Post:
gcool (21-May-2009)
Old
  (#5)
gcool
Member
 
gcool's Avatar
 
Offline
Posts: 60

Level: 6 [♥ Bé-Yêu ♥♥ Bé-Yêu ♥♥ Bé-Yêu ♥♥ Bé-Yêu ♥]
Life: 0 / 140
Magic: 20 / 3679
Experience: 62%

Thanks: 19
Thanked 13 Times in 10 Posts
Join Date: Jan 2009
21-May-2009, 16:56

Hello LeFit,

I did that too. i mean changing the path in /usr/script/crond_script.sh and also creating manually /var/spool/cron/crontab with the root file there.

Ther problem is that when i reboot, all is coming back as before in the crond script and the directories under /var/spool are gone

I am using Gemini2 ver 4.1 with second stage bootloader ver 70

I will dig a bit more .... this is just crazy

G-


(21-May-2009 16:58)


OK guys, i got it working now!!!
I am not sure if this is a bug in Gemini2 but here is what i did:

create a script that will run at boot time (rc3.d) and that will do the following:
- make the proper crontabs directory under /var/spool
- copy the crontab files from /etc to /var/spool
- run the system script /usr/script/crond_script.sh

change mode to 755

here it is
Quote:
[email protected]:/etc/init.d# cat cron

#!/bin/sh
echo Starting Cron
mkdir -p /var/spool/cron/crontabs
cp /etc/cron/crontabs/* /var/spool/cron/crontabs/
/usr/script/crond_script.sh

[email protected]:/etc/init.d#
Edit this system script so the crontab path is under /etc/cron/crontabs because this is where the crontabs are added when we use the remote control editor

Quote:
[email protected]:/usr/script# cat crond_script.sh
#!/bin/sh

CROND_ON=1
NAME=crond
ARGS="-c /etc/cron/crontabs -S"
DAEMON=/usr/sbin/crond

test -f $DAEMON || exit 0

....etc.....

[email protected]:/usr/script#
make a link to /etc/init.d/cron in /etc/rc3.d and call it S30cron

ln -s /etc/init.d/cron /etc/rc3.d/S30cron


Now my crontabs are OK and active at reboot

Why do i need that?
2 reasons
- daily reboot at 6h10AM
- automatic check of Newcs server every 5 mins and if down, automatic restart of CCcam and Newcs

this is my crontabs
Quote:
[email protected]:/etc/rc3.d# crontab -l
10 6 * * * reboot > /dev/null 2>&1 &
20 6 * * * /usr/script/checknewcs.sh &
[email protected]:/etc/rc3.d#
and this is the script that checks newcs server

Quote:
[email protected]:/etc/rc3.d# cat /usr/script/checknewcs.sh
#!/bin/sh
IPADD="your DM IP address"
PORT="CCcam port - default is 16001"
USER="Web interface userid"
PASS="Web interface password"
NEWCSLOG="/etc/tuxbox/config/newcslog.txt"

touch $NEWCSLOG
UID="$USER:[email protected]"
DATE=`date`
echo "Script started: $DATE" >> $NEWCSLOG
while true
do
DATE=`date`
if [ $(wget -q -O - "http://$UID$IPADD:$PORT/servers" | grep '127.0.0.1' | grep -c '| 1 |') -eq 0 ] ; then
#this checks for the pattern '|' 5 blanks '1 |' on the line with 127.0.0.1 an returns 1 if exists or 0 if not
echo "Restarting CCcam : $DATE" >> $NEWCSLOG

/usr/scripts/CCcam_2.1.1_newcs_1.65_cam.sh stop
sleep 5
/usr/scripts/CCcam_2.1.1_newcs_1.65_cam.sh start

fi

sleep 300

done
[email protected]:/etc/rc3.d#
I love my dreambox !!!!

G-


DM800 HD PVR
Gemini2 ver 4.1 - WD-250GB SATA internal


Use the THANKS button if you are happy with the post

Last edited by gcool; 21-May-2009 at 18:01.. Reason: Automerged Doublepost
   
Reply With Quote
Reply

Bookmarks

Tags
crontab, dm800


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump



ECS on RSS ECS on Twitter ECS on Facebook ECS on Youtube
Follow us on:

Powered by vBulletin
Copyright 2002 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
Dreambox