Comment 7 for bug 707479

Revision history for this message
Steve Langasek (vorlon) wrote :

> I have opened bug #731225 upstream to fix the documentation of restart.
> Meanwhile we will need to fix anything that uses 'restart' to use 'stop/start'
> where it may have assumed restart was reloading job configuration. I think
> the first place to start is the restart stanza of upstart-job, which does run
> 'start' on the job if its not running (another side effect of the $0 stop ; $0
> start convention), but if the job is running, will still not reload the job
> config file.

/lib/init/upstart-job already does this from natty on:

restart)
[...]
    if status "$JOB" 2>/dev/null | grep -q ' start/'; then
        RUNNING=1
    fi
    if [ -n "$RUNNING" ] ; then
        stop "$JOB"
    fi
    start "$JOB"
    ;;

Marking as fixed.