Hey,
I got some shell scripts that I would like to run on start-up on my Linux server. I have been reading up on the Upstart feature, which seems to be the (best) way to do this. Is that correct?
And if so, is it correct that i need a .conf file for each located in the /etc/init/ folder, right?
And lately, am I correct in assuming that such a script could look like this:
I got some shell scripts that I would like to run on start-up on my Linux server. I have been reading up on the Upstart feature, which seems to be the (best) way to do this. Is that correct?
And if so, is it correct that i need a .conf file for each located in the /etc/init/ folder, right?
And lately, am I correct in assuming that such a script could look like this:
C++:
# Dataserver Service Template
description "Server"
author "Me <my@email.com>"
start on runlevel [2345] # Start on the given runlevels
stop on runlevel [!2345] # Stop if NOT in one of the given runlevels
respawn # Restart the job if ended without -o
respawn limit 5 10 # Maximum of 5 respawn in a 10 second period
env SERVER_NAME = somename # Change to specifed server
# Run the actual server script
exec C:/SERVER_NAME/server.sh