Rc.d scripts at startup

So, i mean, i only want rc.d script thats starts a .sh e.g.

Code:
#host myrcdscript start
- starts the run.sh
Code:
#host myrcdscript stop
- starts the stop.sh
 
I just want to do it this way also:
if i restart my system and the system is going up the system (rc.d) have to autostart execute a runup.sh
just like mysql but without a daemon just execute the runup.sh
 
Simplest way is to start the script in /etc/rc.local or in root's crontab with the @reboot time.
 
DutchDaemon said:
Simplest way is to start the script in /etc/rc.local or in root's crontab with the @reboot time.

What i've to do for this @reboot?
So what i have to edit
 
No, as the manual show, @reboot replaces the time fields (so all asterisks), which is logical when you think about it. And use [cmd=]crontab -e[/cmd] as the root user, don't edit /etc/crontab. Also make sure your shell script has full path names to all commands.
 
DutchDaemon said:
No, as the manual show, @reboot replaces the time fields (so all asterisks), which is logical when you think about it. And use [cmd=]crontab -e[/cmd] as the root user, don't edit /etc/crontab. Also make sure your shell script has full path names to all commands.

Is at possible any way that the crontab starts my shell 10 minutes after the system start?
 
Yes, something like this is in root's crontab entirely possible:

Code:
@reboot     /bin/sleep 600 && some_script
 
Back
Top