Can upstart handle symbolic links to config files?

Solution 1:

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

$ initctl reload-configuration

Solution 2:

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:

/etc/init/myscripts  /home/me/code/repo/initscripts      none    bind

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.