From: tierno Date: Tue, 20 Sep 2016 11:05:26 +0000 (+0000) Subject: Added openvim client at path when installing openvim service X-Git-Tag: v1.0.0~5 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F60%2F360%2F1;p=osm%2Fopenvim.git Added openvim client at path when installing openvim service Signed-off-by: tierno --- diff --git a/scripts/install-openvim-service.sh b/scripts/install-openvim-service.sh index 743f0f9..05384ea 100755 --- a/scripts/install-openvim-service.sh +++ b/scripts/install-openvim-service.sh @@ -37,7 +37,7 @@ function usage(){ function uninstall(){ service openvim stop - for file in /opt/openvim /etc/default/openvimd.cfg /var/log/openvim /etc/systemd/system/openvim.service /usr/sbin/openvim + for file in /opt/openvim /etc/default/openvimd.cfg /var/log/openvim /etc/systemd/system/openvim.service /usr/sbin/openvim /usr/sbin/initopenvim /usr/sbin/openvim do rm -rf $file || ! echo "Can not delete '$file'. Needed root privileges?" >&2 || exit 1 done @@ -124,15 +124,17 @@ rm -f /var/log/openvim cp -r $FILE /opt/openvim || ! echo $BAD_PATH_ERROR >&2 || exit 1 mkdir -p /opt/openvim/logs rm -rf /usr/sbin/openvim +rm -rf /usr/sbin/initopenvim #cp ${FILE}/openvim /usr/sbin/ || ! echo $BAD_PATH_ERROR >&2 || exit 1 ln -s /opt/openvim/openvimd.cfg /etc/default/openvimd.cfg || echo "warning cannot create link '/etc/default/openvimd.cfg'" ln -s /opt/openvim/logs /var/log/openvim || echo "warning cannot create link '/var/log/openvim'" ln -s /opt/openvim/openvim /usr/sbin/openvim +ln -s /opt/openvim/scripts/service-openvim.sh /usr/sbin/initopenvim chown $USER_OWNER /opt/openvim/openvimd.cfg chown -R $USER_OWNER /opt/openvim -mkdir -p etc/systemd/system/ +mkdir -p /etc/systemd/system/ cat > /etc/systemd/system/openvim.service << EOF [Unit] Description=openvim server diff --git a/scripts/install-openvim.sh b/scripts/install-openvim.sh index 053b3e9..43f58b7 100755 --- a/scripts/install-openvim.sh +++ b/scripts/install-openvim.sh @@ -331,10 +331,10 @@ fi [[ "$_DISTRO" == "CentOS" || "$_DISTRO" == "Red" ]] && yum install -y bash-completion #su $SUDO_USER -c 'mkdir -p ~/.bash_completion.d' su $SUDO_USER -c 'activate-global-python-argcomplete --user' -if ! grep -q bash_completion.d/python-argcomplete.sh /home/${SUDO_USER}/.bashrc +if ! grep -q bash_completion.d/python-argcomplete.sh ${HOME}/.bashrc then echo " inserting .bash_completion.d/python-argcomplete.sh execution at .bashrc" - su $SUDO_USER -c 'echo ". /home/${USER}/.bash_completion.d/python-argcomplete.sh" >> ~/.bashrc' + su $SUDO_USER -c 'echo ". ${HOME}/.bash_completion.d/python-argcomplete.sh" >> ~/.bashrc' fi @@ -343,7 +343,7 @@ if [[ "$_DISTRO" == "Ubuntu" ]] && [[ ${_RELEASE%%.*} == 16 ]] && [[ -z $DEVELO then echo ' ################################################################# -##### CONFIGURE OPENMANO SERVICE ##### +##### CONFIGURE OPENVIM SERVICE ##### #################################################################' ./openvim/scripts/install-openvim-service.sh -f openvim #-u $SUDO_USER