mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
feature #1370: Use a variable for novnc-server
This commit is contained in:
parent
9d543d9aaa
commit
193a6e8a18
@ -24,6 +24,7 @@ if [ -z "$ONE_LOCATION" ]; then
|
|||||||
SUNSTONE_LOG=/var/log/one/sunstone.log
|
SUNSTONE_LOG=/var/log/one/sunstone.log
|
||||||
SUNSTONE_LOG_ERROR=/var/log/one/sunstone.error
|
SUNSTONE_LOG_ERROR=/var/log/one/sunstone.error
|
||||||
SUNSTONE_CONF=/etc/one/sunstone-server.conf
|
SUNSTONE_CONF=/etc/one/sunstone-server.conf
|
||||||
|
NOVNC_SERVER=/usr/bin/novnc-server
|
||||||
else
|
else
|
||||||
SUNSTONE_PID=$ONE_LOCATION/var/sunstone.pid
|
SUNSTONE_PID=$ONE_LOCATION/var/sunstone.pid
|
||||||
SUNSTONE_SERVER=$ONE_LOCATION/lib/sunstone/sunstone-server.rb
|
SUNSTONE_SERVER=$ONE_LOCATION/lib/sunstone/sunstone-server.rb
|
||||||
@ -31,6 +32,7 @@ else
|
|||||||
SUNSTONE_LOG=$ONE_LOCATION/var/sunstone.log
|
SUNSTONE_LOG=$ONE_LOCATION/var/sunstone.log
|
||||||
SUNSTONE_LOG_ERROR=$ONE_LOCATION/var/sunstone.error
|
SUNSTONE_LOG_ERROR=$ONE_LOCATION/var/sunstone.error
|
||||||
SUNSTONE_CONF=$ONE_LOCATION/etc/sunstone-server.conf
|
SUNSTONE_CONF=$ONE_LOCATION/etc/sunstone-server.conf
|
||||||
|
NOVNC_SERVER=$ONE_LOCATION/bin/novnc-server
|
||||||
fi
|
fi
|
||||||
|
|
||||||
setup()
|
setup()
|
||||||
@ -66,7 +68,7 @@ start()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Start novnc server
|
# Start novnc server
|
||||||
novnc-server start
|
$NOVNC_SERVER start
|
||||||
|
|
||||||
if [ "$?" != "0" ]; then
|
if [ "$?" != "0" ]; then
|
||||||
echo "Could not start novnc server" 1>&2
|
echo "Could not start novnc server" 1>&2
|
||||||
@ -103,7 +105,7 @@ start()
|
|||||||
stop()
|
stop()
|
||||||
{
|
{
|
||||||
# Stop novnc server
|
# Stop novnc server
|
||||||
novnc-server stop
|
$NOVNC_SERVER stop
|
||||||
|
|
||||||
if [ ! -f $SUNSTONE_PID ]; then
|
if [ ! -f $SUNSTONE_PID ]; then
|
||||||
echo "Couldn't find sunstone-server process pid."
|
echo "Couldn't find sunstone-server process pid."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user