Custom startup scripts do not work reliable?
-
Hello!
I want to run some startup scripts but I can not get it to work.
1. I just tried the simple one - put my shell script into /usr/local/etc/rc.d/myscript.sh but it does not start.
2. I tried to write a little script that starts my own script - now I get more and more processes of this script over time (currently I have a pfsense running at customer site that has 6 of my script running after 9 days of uptime :-()
Is there any docs how the scripts in /usr/local/etc/rc.d/* has to be written to work?
3. I tried to add a cron jobs that runs my script every 30 minutes this time it worked but I want to run this script not at every half an hour - I and want to run it after reboot every 30 minutes. So it should run at boottime+n*30minutes and not at *:00 and *:30.
I found something about "shellcmd in config.xml" here at the forum but I can not find any more docs of this and how to run it.
Every hint is welcome,
eweri -
1. Add your script to /usr/local/etc/rc.d/
2. The script must end in .sh
3. chmod a+rx /usr/local/etc/rc.d/scriptname.sh -
1. Add your script to /usr/local/etc/rc.d/
2. The script must end in .sh
3. chmod a+rx /usr/local/etc/rc.d/scriptname.shThis is what I have done - and it does not work - but my script runs in an endless loop - maybe this is the problem?
Bye,
eweri