Right way to write an upstart job and get defaults from /etc/defaults?

Andrew Pollock apollock at debian.org
Mon Nov 8 23:30:17 GMT 2010


Hi,

I have a ridiculously simple upstart job, which hangs in similar ways as
described in https://lists.ubuntu.com/archives/upstart-devel/2010-September/001328.html

So my question is, how do I use exec and get a variable sourced from a file in /etc/defaults?

I think the job is pretty self explanatory:

start on runlevel [2345]
stop on [016]

expect fork
respawn

env DEFAULTFILE=/etc/default/nprobe

script

        if [ -f "$DEFAULTFILE" ]; then
                . "$DEFAULTFILE"
        fi

        exec nprobe -G $DAEMON_OPTS

end script

regards

Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/upstart-devel/attachments/20101109/3858732e/attachment.pgp 


More information about the upstart-devel mailing list