I have all of my upstart config files under version control. My ideal way to use upstart is to create soft links from my version control repository (mercurial - not that it matters) into /etc/init but upstart fails to see the jobs. Everything is fine if I copy the files from the repository directory to /etc/init.
Anyone know why upstart fails to handle symbolic or even hard links?
Thanks
Chris
Upstart watches its configuration directories with inotify and reloads the configuration when any of the files change or a new file is added. Apparently this doesn't work for symlinks.
To manually update the configuration use
Upstart does not support symlinks because they might point to a file on a partition that is not loaded at boot time.
I have gotten around this in my own project by putting the conf files in /etc/init/myscripts and then binding that to a directory in my repository.
mount --bind /etc/init/myscripts ~/code/repo/initscripts
.Add this to /etc/fstab and the binding will be persistent:
This effectively gives you hard-linked directories. Upstart will treat the conf files as any other, because they are local to /etc/init. Your DVCS will also see them as local files in the repo, so it will also treat them as it would any other files stored there. Best of both worlds.
As mentioned before:
However if you get an error like the following:
You must invoke the sudo: