MT#6561 Make sure daemon executable is available before executing any actions

Otherwise we might run into situations like that:

| Removing ngcp-schema ...
| Force-reloading ngcp-panel to handle schema changes
| [....] Restarting web application: ngcp-panel not runningstart-stop-daemon: unable to stat /usr/share/ngcp-panel/ngcp_panel_fastcgi.pl (No such file or directory)
| [FAIL] error ... failed!
|  failed!
| invoke-rc.d: initscript ngcp-panel, action "force-reload" failed.
agranig/subprof
Michael Prokop 11 years ago
parent 6acd3f210d
commit 4789f25e5b

@ -27,6 +27,11 @@ NPROC=1
OPTIONS="--listen $USOCKET --daemon --pidfile $PIDFILE --nproc $NPROC"
if ! [ -x "$DAEMON" ] ; then
log_warning_msg "File $DAEMON not available/executable."
exit 0
fi
check_running() {
if [ -s $PIDFILE ]; then
kill -0 $(cat $PIDFILE) >/dev/null 2>&1

Loading…
Cancel
Save