methods/in_common.rb
# Clear a service out of maintenance mode
Clear a service out of maintenance mode
Clear a service out of maintenance mode
def clear_service(options,smf_service)
  message    = "Checking:\tStatus of service "+smf_service
  command    = "sleep 5 ; svcs -a |grep \"#{options['service']}\" |awk \"{print \\\$1}\""
  output     = execute_command(options,message,command)
  if output.match(/maintenance/)
    message    = "Clearing:\tService "+smf_service
    command    = "svcadm clear #{smf_service}"
    output     = execute_command(options,message,command)
  end
  return
end
def clear_service ( options , smf_service ) message = "Checking:\tStatus of service " + smf_service command = "sleep 5 ; svcs -a |grep \"#{options['service']}\" |awk \"{print \\\$1}\"" output = execute_command ( options , message , command ) if output . match ( / maintenance / ) message = "Clearing:\tService " + smf_service command = "svcadm clear #{smf_service}" output = execute_command ( options , message , command ) end return end
Clear a service out of maintenance mode
Clear a service out of maintenance mode
options
<not_specific>
smf_service
<not_specific>