Permalink
Browse files

Status and stop for maintenance

  • Loading branch information...
1 parent aee95b4 commit a3c4e60089df6ecf44ebe280cb628d6252a60eb5 @rcsimm rcsimm committed Mar 27, 2012
Showing with 9 additions and 1 deletion.
  1. +9 −1 glass_stone.rb
View
@@ -79,12 +79,12 @@ def start_hypers
end
def start_maintenance
- GlassStone.clear_status
start_service_named(maintenance_service)
end
def start_service_named(a_service_name)
option = if name == 'development' then 'o' else 'u' end
+ puts("Starting service #{a_service_name}")
system("svc -#{option} /service/#{a_service_name}")
end
@@ -130,6 +130,10 @@ def stop
super
end
+ def stop_maintenance
+ system("svc -d /service/#{maintenance_service}")
+ end
+
def stop_hypers
services_names.each { |service_name| system("svc -d /service/#{service_name}") }
wait_for_hypers_to_stop
@@ -211,6 +215,10 @@ def services_names
hyper_ports_lighty.collect { | port | "#{name}-#{port}" }
end
+ def status_maintenance
+ system("svstat /service/#{maintenance_service}")
+ end
+
def status_hyper_port(port)
system("svstat /service/#{name}-#{port}")
fuser_hyper_port(port)

0 comments on commit a3c4e60

Please sign in to comment.