I wrote an upstart
service following the Ubuntu wiki article and created a .conf
file in /etc/init/
. There're no instructions on how to proceed to make the script available in initctl list
and for upstart
management commands, like start
and service
. The official upstart cookbook doesn't explain this matter.
The start fails with
$ start archiva
start: Unknown job: archiva
$ service archiva start
archiva: unrecognized service
Probably there are some errors in you conf file. To verify it use:
or
as described in upstart cookbook: 10.1.6.2 initctl check-config and 10.1.7 init-checkconf.
Upstart use init daemon that, according to man page:
So, once you place your configuration file in
/etc/init
, your service is enabled and on the next reboot the init daemon will start it.Upstart uses inotify. If you drop a configuration file into
/etc/init/
, Upstart should detect and make the job available automatically. If you don't see it appear, there may be a problem in your new configuration. Try checking the logs for errors.Defining a variable in the
/etc/init/scriptname.conf
file in the form ofNAME=value
like you'd do in aninitd
script causes upstart to give this rather nonsense feedback (telling that there's a syntax error is much more suitable than saying that the script doesn't exist). Removing the line causes the script to be recognized and startable randomly (see my suggested improvement as bug 1446577 on launchpad.net for details).