-
-
Save dtuite/7da37c782c101ffcb234 to your computer and use it in GitHub Desktop.
Upstart provides a way to start/stop/restart services on Ubuntu.
Each service you wish to control with upstart needs a file in /etc/init/[service name].conf
. You place instructions about how to start the service, when it should be started (e.g. on startup) etc. within this file.
NOTE: If you use symlinks to create upstart files the nyou must run sudo initctl reload-configuration
after creating the symling. Otherwise your changes will not be detected.
Once the init file has been created, you can start your service using sudo start [service name]
where [service name]
is the name of the conf file you created in /etc/init/
. Similarly, you can stop the service using sudo stop [service name]
.
The program behind upstart is called initctl
. You can view it's man page to see all the things you can do with Upstart. For example, you can check the integrity of your init scripts using sudo initctl check-config
.