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:
Artem Tiumentcev 2017-01-27 08:54:01 +03:00 committed by Artem Tiumentcev
parent 3a36106707
commit ec4c71fd80
1 changed files with 2 additions and 2 deletions

View File

@ -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