View Full Version : auto restart oscam on dm500 server
smoggie
3rd September, 2012, 09:16 PM
Been trying to get this working but no luck
using this script here
#!/bin/sh
process=`ps auxwww | grep oscam | grep -v grep | awk '{print $1}'`
if [ -z "$process" ]; then
echo "Couldn't find oscam running. Restarting server-binary" >> /var/log/oscam.check
nohup /var/bin/oscam >> /var/log/oscam.log &
else
echo "oscam is still OK!" >> /var/log/oscam.check
fi
I am using cccam2.1 & oscam 6359 on gemini image
I have added the above script to var/script and set attributes to 755. I have went into blue panel>services/daemons and started crond. In set up I have added/var/script/OscamCheck.sh to run every 5 mins.
Used a killall command to stop oscam but it has not restarted.Any help appreciated.
smoggie
5th September, 2012, 07:42 PM
someon on forum must have some idea
Rodbouy
5th September, 2012, 08:14 PM
Why do you want this or need this?
If OScam is needing restarted from anything else other than a box crash then there is something wrong.
Your adding to something as simplistic as OScam on a Dm500 when there is no need mate.
What problems are you having?
smoggie
5th September, 2012, 09:06 PM
box is running gemini 4.7 ccam 2.13 & oscam 6539
Sometimes oscam bottles it and stop working. The reason I want the script is so that it checks every 5 mins that oscam is working and if not it will start it.
I intially added the script to var/script but tonight I have added it to var/bin as I think from my searching thats where it should go.
I have went into blue panel and set up a new cron task var/bin/OscamCheck.sh to run every 5 mins
Rodbouy
5th September, 2012, 10:50 PM
I have never used Yemeni but I would scrap cccam and use only oscam.
Oscam in a dm500 runs sweet mate. Don't over complicate it with scripts and cccam etc.
Keep it simple.
I have never had a oscam stopping issue unless box freezes and crashes which is about 3 times in the last 3 years. Rare
smoggie
8th September, 2012, 12:15 PM
I guess its an option but I will then have to change my lines
smoggie
9th September, 2012, 12:47 AM
"I have never had a oscam stopping issue unless box freezes and crashes which is about 3 times in the last 3 years. Rare "
Is that running oscam alone on a dm500 server?
Rodbouy
9th September, 2012, 08:02 AM
"I have never had a oscam stopping issue unless box freezes and crashes which is about 3 times in the last 3 years. Rare "
Is that running oscam alone on a dm500 server?
Yes mate, you dont need to change the lines you have say in other boxes around the house shall we say, you just need to add the user pass details to OScam.user
Then enable dvbapi in oscam.conf and the protocol that you are using in other boxes such as cccam or newcamd
or you can use camd to connect boxes
smoggie
9th September, 2012, 09:26 PM
conf
[global]
nice = -1
WaitForCards = 1
logfile = stdout
preferlocalcards = 1
saveinithistory = 1
[webif]
httpport = 8888
httpuser = admin
httppwd = admin
httpallowed = 127.0.0.1,192.168.0.0-192.168.255.255
# protocols
[newcamd]
key = 0102030405060708091011121314
port = 10001@0963:000000
# protocols
[cccam]
port = 12005 my forwarded port
reshare = 2
version = 2.1.3
stealth = 1
[dvbapi]
enabled = 1
user = test1
socket = /tmp/camd.socket
boxtype = dreambox
au = 1
user
[account]
user = test1
description = for local mgcamd or DVBAPI
pwd = test2
disabled = 0
uniq = 1
group = 1
au = skyuk
caid = 0963:000000
[account]
user = localdm1
description = for local mgcamd or DVBAPI
pwd = localdm2
disabled = 0
uniq = 1
group = 1
au = 0
caid = 0963:000000
How does this look?? So I now need to remove cccam from test1(server) along with the cfg file ans run oscam as cardserver. My box downstairs (localdm1) remains the same.
Rodbouy
9th September, 2012, 09:47 PM
oscam.conf
[global]
logfile = /var/log/oscam.log
disablelog = 0
disableuserfile = 0
usrfileflag = 0
clienttimeout = 5000
fallbacktimeout = 2500
clientmaxidle = 120
failbantime = 30
cachedelay = 120
bindwait = 120
netprio = 0
clientdyndns = 0
resolvedelay = 30
unlockparental = 0
nice = -1
serialreadertimeout = 1500
maxlogsize = 50
waitforcards = 1
preferlocalcards = 1
saveinithistory = 1
readerrestartseconds = 5
lb_mode = 1
lb_save = 0
lb_nbest_readers = 2
lb_nfb_readers = 1
lb_min_ecmcount = 5
lb_max_ecmcount = 500
lb_reopen_seconds = 900
resolvegethostbyname = 0
failbantime = 10
double_check = 1
[newcamd]
port = *****@CAID:000000
key = 0102030405060708091011121314
[cccam]
port = *****
#below is for camd
[cs357x]
port = *****
# this needs to be ebabled so that the box will let you view channels the user must be same as an account in oscam.user.
[dvbapi]
enabled = 1
au = UK
boxtype = dreambox
user = Local
socket = /tmp/camd.socket
[webif]
httpport = 8888 #default
httpuser = user
httppwd = pass
httpcss = /var/tuxbox/config/light-blue-3d-V2.0.css
httpallowed = 127.0.0.1,192.168.1.102-192.168.1.104,192.168.1.105-192.168.1.120 # edit range to suit your network. or no access to webif
httphideidleclients = 1
oscam.server
[reader]
label = UK
protocol = internal
device = /dev/sci0
caid = CAID
detect = cd
mhz = 500
cardmhz = 500
ident = CAID:000000
group = 1
emmcache = 1,3,15
blockemm-unknown = 1
blockemm-g = 1
lb_weight = 101
auprovid = 000CAID
oscam.user
#sample with au
[account]
user = Room1
pwd = Room1Pass
group = 1
uniq = 3
au = UK # if you want client to update card this must match reader label in oscam.server
#No au
[account]
user = Room2
pwd = Room2Pass
group = 1
uniq = 3
# must match dvbapi in oscam.conf
[account]
user = Local
group = 1
au = UK
Now the boxes say in your home can still use their existing cccam cline for as long as the user pass port is same as oscam.user and port in oscam.conf
Oscam stable 1.10 but not sure what build they are on the now. Site seems to be down, not been on it for some time.
smoggie
10th September, 2012, 10:19 PM
cheers for help Rodbouy, getting there slowly. I have added user account to oscam conf but I am getting timeout on the connection. User account is showing online.
smoggie
11th September, 2012, 05:39 PM
will have a bash at it at the weekend again. Sure its just something simple vecause everythhing seems to be working bar getting pic on tv. Been having a look here http://www.digital-kaos.co.uk/forums/f205/oscam-cccam-2-1-3-a-198102/index3.html and reading your posts on page 7
Rodbouy
11th September, 2012, 06:36 PM
if its not clearing on box
make sure the dvbapi user s the same as a uer acc in oscam.user
this is the built in cam to clear in the box
Rodbouy
11th September, 2012, 06:47 PM
Did you manually install OScam ?
smoggie
12th September, 2012, 10:03 PM
havent tried again but I didnt manually install oscam. I stopped cccam via blue panel and left only oscam running as cardserver. Typed in "ps" in telnet to confirm that only oscam was running. Will post back at the weekend. Cheers Rodbouy.
Rodbouy
12th September, 2012, 10:46 PM
havent tried again but I didnt manually install oscam. I stopped cccam via blue panel and left only oscam running as cardserver. Typed in "ps" in telnet to confirm that only oscam was running. Will post back at the weekend. Cheers Rodbouy.
OScam now on build 1.20.
Edit
I just decided to upgrade to 1.20 and get the timeout as current settings, as it doesnt read the card.
Is this the same for you?
Rodbouy
15th September, 2012, 03:05 PM
Alright mate here are my configs if you want them.
oscam.conf
[global]
logfile = stdout
waitforcards = 1
waitforcards_extra_delay = 3000
preferlocalcards = 1
lb_mode = 1
lb_save = 1000
lb_savepath = /tmp/stats
lb_reopen_mode = 1
lb_retrylimit = 1000
lb_stat_cleanup = 24
unlockparental = 1
[newcamd]
port = *****@CAID:000000
key = 0102030405060708091011121314
[cccam]
port = *****
reshare = 1
[cs357x]
port = *****
[dvbapi]
enabled = 1
au = 1
boxtype = dreambox
user = Local
socket = /tmp/camd.socket
[webif]
httpport = ****
httpuser = Rodbouy
httppwd = *****
httprefresh = 5
httpcss = /var/tuxbox/config/light-blue-3d-V2.0.css
httpallowed = 127.0.0.1, IP RANGE of network
httphideidleclients = 1
[monitor]
appendchanninfo = 1
oscam.server
[reader]
label = NAME YOUR READER
protocol = internal
device = /dev/sci0
blockemm-u = 0
blockemm-s = 0
blockemm-g = 1
blockemm-unknown = 1
emmcache = 1,3,15
group = 1
caid = CAID
ecmwhitelist = CAID:3E,42,44,45,47,4E,4F,53,54,61,62,67,68,69,6A, 6B,6D,6F,71,72,73,77,78,79,7A,7C,7D,7E,80,8B,85
oscam.user
1st user willl au card
[account]
user = Smoggie1
pwd = Smoggiepass1
group = 1
uniq = 3
au = Name of reader
2nd user wont au card
[account]
user = Smoggie2
pwd = SmoggiePass2
group = 1
uniq = 3
dvbapi to clear channels on box but user must match that in oscam.conf no pass req
[account]
user = Local
pwd =
group = 1
au = NAME OF READER to update card
In the oscam.conf I showed 3 examples of cams to use.
If linking 2 boxes use camd [cs357x].
you just add the details to oscam.server and give it a user acc in oscam.user
Thet white list is uptodate, a old one I had wouldn clear ESPN HD but updated it last night and all working.
smoggie
16th September, 2012, 12:59 PM
Cheers for the info Rodbuoy. If I remember righlty it was showing the card entitlements in oscam so I presume the card was being read. I still haven't tried it again but will update thread as soon as I do.
smoggie
17th September, 2012, 06:26 PM
Okay tried today with the above configs and also installed the latest oscam. All is working fine. Thanx very much for the help Rodbuoy
seanmckeown
19th September, 2012, 04:04 PM
I've just been testing something similar myself. I went from using cccam to oscam and was able to keep the same lines just by activating the cccam protocol in oscam. Although I didn't put it in or activate dvbapi, and my lines are working no problem. Do I need to put in the dvbapi details? Just curious as it seems to be working fine without it and don't want to fix somthing that's not broken
Sent from my Lumia 800 using Board Express
Rodbouy
19th September, 2012, 10:50 PM
Dvbapi is the inbuilt cam so that you are able to clear channels on the box, wont affect anytbing else
seanmckeown
20th September, 2012, 10:28 AM
Cheers. Is 500 MHz an ok speed for the card in a dm500?
Sent from my Lumia 800 using Board Express
Rodbouy
20th September, 2012, 03:25 PM
Im pretty sure clones set at 357 as they dpnt change no matter what you try to set it as
smoggie
20th September, 2012, 05:28 PM
Its the 1st time I've heard clones will run at 375
If it runs at 500 these are the settings
mhz = 500
cardmhz = 500
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.