From: tierno Date: Mon, 8 May 2017 16:37:05 +0000 (+0200) Subject: minor change at instal-openmano-service.sh X-Git-Tag: v2.0.1~14 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=1a13243c82ea9ce2f1c5cd7ac53ccaaa142263cf;p=osm%2FRO.git minor change at instal-openmano-service.sh Change-Id: Ia6260e8ed18dc6c26c32845f078250e9c2938065 Signed-off-by: tierno --- diff --git a/scripts/install-openmano-service.sh b/scripts/install-openmano-service.sh index a909dd16..64766188 100755 --- a/scripts/install-openmano-service.sh +++ b/scripts/install-openmano-service.sh @@ -36,11 +36,15 @@ function usage(){ } function uninstall(){ - echo "systemctl disable openmano.service " && systemctl disable openmano.service 2>/dev/null || echo " Already done" - echo "systemctl disable osm-ro.service " && systemctl disable osm-ro.service 2>/dev/null || echo " Already done" + echo "systemctl disable openmano.service " && systemctl disable openmano.service 2>/dev/null || + echo " Already done" + echo "systemctl disable osm-ro.service " && systemctl disable osm-ro.service 2>/dev/null || + echo " Already done" echo "service openmano stop " && service openmano stop 2>/dev/null || echo " Already done" echo "service osm-ro stop " && service osm-ro stop 2>/dev/null || echo " Already done" - for file in /opt/openmano /etc/default/openmanod.cfg /etc/osm/openmanod.cfg /var/log/openmano /var/log/osm/openmano* /etc/systemd/system/openmano.service /etc/systemd/system/osm-ro.service /usr/bin/openmano /usr/sbin/service-openmano /usr/bin/openmano-report + for file in /opt/openmano /etc/default/openmanod.cfg /etc/osm/openmanod.cfg /var/log/openmano /var/log/osm/openmano* \ + /etc/systemd/system/openmano.service /etc/systemd/system/osm-ro.service /usr/bin/openmano /usr/sbin/service-openmano \ + /usr/bin/openmano-report do echo rm $file rm -rf $file || ! echo "Can not delete '$file'. Needed root privileges?" >&2 || exit 1 @@ -131,7 +135,8 @@ uninstall #copy files cp -r "$FILE" /opt/openmano || ! echo $BAD_PATH_ERROR >&2 || exit 1 mkdir -p /etc/osm || echo "warning cannot create config folder '/etc/osm'" -cp /opt/openmano/osm_ro/openmanod.cfg /etc/osm/openmanod.cfg || echo "warning cannot create file '/etc/osm/openmanod.cfg'" +cp /opt/openmano/osm_ro/openmanod.cfg /etc/osm/openmanod.cfg || + echo "warning cannot create file '/etc/osm/openmanod.cfg'" mkdir -p /var/log/osm || echo "warning cannot create log folder '/var/log/osm'" #makes links ln -s -v /opt/openmano/openmano /usr/bin/openmano @@ -154,7 +159,7 @@ Restart=always WantedBy=multi-user.target EOF -[[ -n $DELETE ]] && rm -rf ${FILE} +[[ -n $DELETE ]] && rm -rf "${FILE}" service osm-ro start systemctl enable osm-ro.service