1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-02-15 05:57:23 +03:00

feature #1370: start and stop vnc server ins sunstone start script

This commit is contained in:
Javi Fontan 2013-03-06 11:32:53 +01:00
parent 4a1114adcd
commit 9d543d9aaa
2 changed files with 14 additions and 4 deletions

View File

@ -167,7 +167,7 @@ class OpenNebulaVNC
sleep 1
if is_running?
message="The server is still running"
message="VNC server is still running"
STDERR.puts message
logger.error message
return false
@ -175,7 +175,7 @@ class OpenNebulaVNC
delete_token_dir
else
message="The server is not running"
message="VNC server is not running"
@logger.info message
STDERR.puts message
end
@ -184,10 +184,10 @@ class OpenNebulaVNC
def status
if is_running?
STDOUT.puts "novnc is running"
STDOUT.puts "VNC is running"
true
else
STDOUT.puts "novnc is NOT running"
STDOUT.puts "VNC is NOT running"
false
end
end

View File

@ -65,6 +65,13 @@ start()
exit 1
fi
# Start novnc server
novnc-server start
if [ "$?" != "0" ]; then
echo "Could not start novnc server" 1>&2
fi
# Start the sunstone daemon
touch $SUNSTONE_LOCK_FILE
ruby $SUNSTONE_SERVER > $SUNSTONE_LOG 2>$SUNSTONE_LOG_ERROR &
@ -95,6 +102,9 @@ start()
#
stop()
{
# Stop novnc server
novnc-server stop
if [ ! -f $SUNSTONE_PID ]; then
echo "Couldn't find sunstone-server process pid."
exit 1