I am maintaining an Upstart script (version 0.6.5) and in the pre-start script
, there's a test to terminate the service if a precondition is not met:
pre-start script
if [ ! -f $REQUIRED_FILE ]; then
echo "$REQUIRED_FILE does not exit" >> $LOG_FILE
stop
exit 1
fi
end script
According to the csh
/tcsh
reference documentation, stop [jobIDs]
:
suspend[s] the current background jobs or the background jobs specified by jobIDs; this is the complement of Ctrl-Z or suspend.
I don't see any use for stop
here, especially in the pre-start
section wherein the service has not started yet (i.e. by the exec
stanza).
Am I missing something here? Or is stop
here redundant and unnecessary?