Hello, instead of restart and everything, I'd like to create a script to reload only its config file (oscam.server) so that I can launch it as a script or I can create a cron.
Is it possible to do that?
Hello.
Why didn't you open a separate TOPIC ?
This discussion thread is about a different problem !
What exactly do you mean by reloading "oscam.server" ? Do you mean reload all readers - restart them ? For this, there was a SIGHUP signal for the oscam process, but there was always a problem with it and I don't know if it still works: http://www.streamboard.tv/oscam/ticket/498
killall -SIGHUP oscam or killall -HUP oscam
Next, it would be necessary to add the following entries to the "oscam.conf" file (you only care about "reload_readers", so just try to add this one item there):
reload_useraccounts = 1
reload_readers = 1
reload_provid = 1
reload_services_ids = 1
reload_tier_ids = 1
reload_fakecws = 1
reload_ac_stat = 1
reload_log = 1
Depending on what you need, you could theoretically also use an Oscam-Webif call with the "wget" command.
- to reload readers with helping of the OscamWebif:
wget -q -O - "http://loginname:password@127.0.0.1:8888/readers.html?action=reloadreaders"
- example for CRON (scheduled every 10 days, at 06:00), for Entitlements refreshment with Oscam-Webif:
0 6 */10 * * /usr/bin/wget -q -O - "http://loginname:password@127.0.0.1:8888/readers.html?action=reread&label=reader_sci0"
Otherwise, if anyone is interested, I also modified my starting bash script (on my Github you will find this script "/etc/init.d/softcam" in the basic version, without modifying auto-restart on crash). I edited this script for a friend esuo2 . The script runs in the background to test if the Oscam crashes, and if so, I'll start the oscam process again. The "fInfiniteLoop()" function runs continuously and verifies every 5 seconds that a process called "oscam" is running.
I don't understand people who need autorestart when crashing Oscam, because Oscam really can't fall or freeze - if that happens it's bad and the problem needs to be solved!