From ec4c71fd80d84d56de5aab4d5214f5f4313a3117 Mon Sep 17 00:00:00 2001 From: Artem Tiumentcev Date: Fri, 27 Jan 2017 08:54:01 +0300 Subject: [PATCH] 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 --- meta/io.murano/Resources/murano-agent | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/io.murano/Resources/murano-agent b/meta/io.murano/Resources/murano-agent index 0bb3a233..41c11da1 100644 --- a/meta/io.murano/Resources/murano-agent +++ b/meta/io.murano/Resources/murano-agent @@ -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 \ No newline at end of file +esac