Start-Up/Shutdown Script
Hello,
Working on a Red Hat Enterprise 3 (ES) server, I want to lauch a number of application at start-up time and close them in case of a server shutdown. In what file should I add these start-up commands and where should such a file be located ? PT PS: I have a Database startup/shutdown script located in /etc/init.d/dbora. I want to do the same with a few other applications. |
You should be able to put any script you write in /etc/init.d and have it loaded
on startup, and stopped on shutdown. You just need to use a case statement to make it accept start, and stop. You can then set all your startup commands to be executed when it recieves the start command. To add commands for shutdown, have them under your stop command. The reason this works is that /etc/rc.d/rc (on my Fedora system) executes these scripts with a start or stop command, depending on startup or shutdown. Most allow restart, reload, or other commands. Here is an incomplete example, if you look at scripts in that file, you will see that most adhere to certain standards, or are just function files. Code:
#!/bin/bash /etc/rc.d/rc.local is also common place to add startup commands |
All times are GMT -5. The time now is 05:37 PM. |