From c50b4356a272e35f01d4237e4b18391e847e6d08 Mon Sep 17 00:00:00 2001 From: tierno Date: Wed, 14 Sep 2016 15:54:54 +0200 Subject: [PATCH] make openmano client at the path when installing openmano as a service Change-Id: I2ce08c02607a4743867c3599c9d31523bb4a9bea Signed-off-by: tierno --- scripts/install-openmano-service.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/install-openmano-service.sh b/scripts/install-openmano-service.sh index d1a1fda3..c1b3f377 100755 --- a/scripts/install-openmano-service.sh +++ b/scripts/install-openmano-service.sh @@ -37,7 +37,7 @@ function usage(){ function uninstall(){ service openmano stop - for file in /opt/openmano /etc/default/openmanod.cfg /var/log/openmano /etc/systemd/system/openmano.service + for file in /opt/openmano /etc/default/openmanod.cfg /var/log/openmano /etc/systemd/system/openmano.service /usr/sbin/openmano do rm -rf $file || ! echo "Can not delete '$file'. Needed root privileges?" >&2 || exit 1 done @@ -122,10 +122,12 @@ rm -rf /opt/openmano rm -f /etc/default/openmanod.cfg rm -f /var/log/openmano cp -r $FILE /opt/openmano || ! echo $BAD_PATH_ERROR >&2 || exit 1 -mkdir /opt/openmano/logs +mkdir -p /opt/openmano/logs +rm -rf /usr/sbin/openmano #cp ${FILE}/openmano /usr/sbin/ || ! echo $BAD_PATH_ERROR >&2 || exit 1 ln -s /opt/openmano/openmanod.cfg /etc/default/openmanod.cfg || echo "warning cannot create link '/etc/default/openmanod.cfg'" ln -s /opt/openmano/logs /var/log/openmano || echo "warning cannot create link '/var/log/openmano'" +ln -s /opt/openmano/openmano /usr/sbin/openmano chown $USER_OWNER /opt/openmano/openmanod.cfg chown -R $USER_OWNER /opt/openmano -- 2.25.1