Fixed opportunity run muranoagent twice
The variable name $PIDNAME doesnt exist, therefore we can start murano-agent twice or more. Closes-bug: #1663194 Change-Id: I3056b89645d517375dfdecf2eceaebb249d24e6e
This commit is contained in:
parent
3a36106707
commit
ec4c71fd80
@ -18,7 +18,7 @@ PIDFILE=/var/run/murano.pid
|
||||
LOGFILE=/var/log/murano.log
|
||||
|
||||
start() {
|
||||
if [ -f /var/run/"$PIDNAME" ] && kill -0 "$(cat /var/run/"$PIDNAME")"; then
|
||||
if [ -f "$PIDFILE" ] && kill -0 "$(cat "$PIDFILE")"; then
|
||||
echo 'Service already running' >&2
|
||||
return 1
|
||||
fi
|
||||
@ -52,4 +52,4 @@ case "$1" in
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|uninstall}"
|
||||
esac
|
||||
esac
|
||||
|
Loading…
Reference in New Issue
Block a user