function uninstall(){
echo "systemctl disable openmano.service " && systemctl disable openmano.service 2>/dev/null || echo " Already done"
- echo "systemctl disable openmano.service " && systemctl disable osm-ro.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 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
do
echo rm $file
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
-ln -s -v /opt/openmano/scripts/service-openmano.sh /usr/sbin/service-openmano
-ln -s -v /opt/openmano/scripts/openmano-report.sh /usr/bin/openmano-report
+ln -s -v /opt/openmano/scripts/service-openmano /usr/sbin/service-openmano
+ln -s -v /opt/openmano/scripts/openmano-report /usr/bin/openmano-report
chown -R $SUDO_USER /opt/openmano
su $SUDO_USER -c 'rm -f ${HOME}/bin/service-openmano'
su $SUDO_USER -c "ln -s '${OPENMANO_BASEFOLDER}/openmano' "'${HOME}/bin/openmano'
su $SUDO_USER -c "ln -s '${OPENMANO_BASEFOLDER}/scripts/openmano-report.sh' "'${HOME}/bin/openmano-report'
- su $SUDO_USER -c "ln -s '${OPENMANO_BASEFOLDER}/scripts/service-openmano.sh' "'${HOME}/bin/service-openmano'
+ su $SUDO_USER -c "ln -s '${OPENMANO_BASEFOLDER}/scripts/service-openmano' "'${HOME}/bin/service-openmano'
#insert /home/<user>/bin in the PATH
#skiped because normally this is done authomatically when ~/bin exist
echo
echo "Done! installed at /opt/openmano"
- echo " Manage server with 'sudo service openmano start|stop|status|...' "
+ echo " Manage server with 'sudo service osm-ro start|stop|status|...' "
else
echo
echo "Done! you may need to logout and login again for loading client configuration"
- echo " Run './${OPENMANO_BASEFOLDER}/scripts/service-openmano.sh start' for starting openmano in a screen"
+ echo " Run './${OPENMANO_BASEFOLDER}/scripts/service-openmano start' for starting openmano in a screen"
fi
[[ $force_ != y ]] && [[ $force_ != yes ]] && echo "aborted!" && $_exit
echo "Stopping openmano"
- $DIRscript/service-openmano.sh mano stop${screen_mano_param}
+ $DIRscript/service-openmano mano stop${screen_mano_param}
echo "Initializing openmano database"
$DIRmano/database_utils/init_mano_db.sh -u mano -p manopw --createdb
echo "Starting openmano"
- $DIRscript/service-openmano.sh mano start${screen_mano_param}
+ $DIRscript/service-openmano mano start${screen_mano_param}
echo
elif [[ $action == "delete" ]]
openvim vm-delete -f | grep -q deleted && sleep 10 #give some time to get virtual machines deleted
echo "Stopping openmano"
-$DIRscripts/service-openmano.sh stop
+$DIRscripts/service-openmano stop
echo "Initializing databases"
$DIRvim/database_utils/init_vim_db.sh -u vim -p vimpw
$DIRmano/database_utils/init_mano_db.sh -u mano -p manopw
echo "Starting openmano"
-$DIRscripts/service-openmano.sh start
+$DIRscripts/service-openmano start
echo "Creating openmano tenant 'mytenant'"
nfvotenant=`openmano tenant-create mytenant --description=mytenant |gawk '{print $1}'`
[[ $force != y ]] && [[ $force != yes ]] && echo "aborted!" && $_exit
echo "Stopping openmano"
- $DIRscript/service-openmano.sh mano stop
+ $DIRscript/service-openmano mano stop
echo "Initializing openmano database"
$DIRmano/database_utils/init_mano_db.sh -u mano -p manopw --createdb
echo "Starting openmano"
- $DIRscript/service-openmano.sh mano start
+ $DIRscript/service-openmano mano start
elif [[ $action == "delete" ]]
then