TT#19300 Fix ngcp-panel start race condition on server boot

The old code removed PID file before the check of starting ngcp-panel,
as a result in the worst case it removes PIDFILE for 'just' started ngcp-panel.

We should ensure no ngcp-panel is being started before removing PIDFILE.

Change-Id: I10e601639b81d5837d132ee78a5945419fde81d5
changes/17/14517/3
Alexander Lutay 8 years ago committed by Víctor Seva
parent f85becc105
commit 26c96e96e7

@ -77,8 +77,8 @@ _start() {
log_end_msg 0
exit 0
fi
rm -f $PIDFILE 2>/dev/null
check_for_ongoing_startup || return 0
rm -f "$PIDFILE" 2>/dev/null
# shellcheck disable=SC2086
start-stop-daemon --start --quiet \
--pidfile $PIDFILE \

Loading…
Cancel
Save