Nikolay Starodubtsev 15df963544 Change incorrect murano-agent bin file location
During cloud-init related improvements murano-agent location was
specified for the pip-style installation. This leads to unability
to deploy the apps on the images with pre-installed murano-agent
without network. This commit create a symlink to the pre-installed agent
in place where pip usually installs packages.

Change-Id: I8d90d33dc0a1c36ac4524f8f3b82223c23829126
Closes-Bug: #1570962
2016-05-10 14:10:02 +03:00

20 lines
667 B
Bash

#!/bin/sh
if [ -d /opt/stack/venvs/murano-agent ] && [ ! -f /usr/local/bin/muranoagent ]; then
ln -s /opt/stack/venvs/murano-agent/bin/muranoagent /usr/local/bin/muranoagent
fi
which muranoagent > /dev/null
if [ $? -eq 0 ]; then
echo "murano-agent service exists"
else
muranoAgentConf='%MURANO_AGENT_CONF%'
echo $muranoAgentConf | base64 -d > /etc/init/murano-agent.conf
muranoAgentService='%MURANO_AGENT_SERVICE%'
echo $muranoAgentService | base64 -d > /etc/systemd/system/murano-agent.service
muranoAgent='%MURANO_AGENT%'
echo $muranoAgent | base64 -d > /etc/init.d/murano-agent
chmod +x /etc/init.d/murano-agent
pip install murano-agent
fi