# File lib/puppet/provider/service/base.rb, line 105 105: def stop 106: if @resource[:stop] or stopcmd 107: ucommand(:stop) 108: else 109: pid = getpid 110: unless pid 111: self.info "%s is not running" % self.name 112: return false 113: end 114: begin 115: output = kill pid 116: rescue Puppet::ExecutionFailure => detail 117: @resource.fail "Could not kill %s, PID %s: %s" % 118: [self.name, pid, output] 119: end 120: return true 121: end 122: end