Need help in making a program auto start when reboot
5 Replies
chkconfig –list httpd
Another way of doing it is to have cron start the service. As an example, here's how you could automatically start your Teamspeak server.
First, change to the user account you want the server to run as ("teamspeak" in this case).
su - teamspeak
Then, unless you are familiar with vi, set an editor to use. Nano is pretty easy to get started with. (If it is not installed, yum install nano will do so.)
export EDITOR=/usr/bin/nano
Now you can edit the crontab file.
crontab -e
Insert the following line.
@reboot /full/path/to/teamspeak/server/program > /dev/null 2>&1 &
Then save the file and exit the editor. Now you can exit your session as the teamspeak user.
exit
When your system is rebooted (actually, any time the cron daemon restarts), the Teamspeak server will be run.