Class: Service::Remove
- Inherits:
-
Object
- Object
- Service::Remove
- Includes:
- Mongrel::Command::Base, ServiceValidation
- Defined in:
- lib/mongrel_service/init.rb
Instance Method Summary collapse
Methods included from ServiceValidation
Instance Method Details
#run ⇒ Object
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
# File 'lib/mongrel_service/init.rb', line 181 def run display_name = ServiceManager.getdisplayname(@svc_name) begin puts "Stopping #{display_name} if running..." ServiceManager.stop(@svc_name) rescue ServiceManager::ServiceError => e end begin ServiceManager.delete(@svc_name) rescue ServiceManager::ServiceError => e puts e end unless ServiceManager.exist?(@svc_name) then puts "#{display_name} service removed." end end |