3 attr_accessor :name, :uid, :gid, :start, :stop, :restart, :pidfile
5 def initialize(options={})
23 def call_action(action)
24 command = send(action)
25 if command.kind_of?(String)
27 # fork/exec to setuid/gid
29 Process::Sys.setgid(Etc.getgrnam(self.gid).gid) if self.gid
30 Process::Sys.setuid(Etc.getpwnam(self.uid).uid) if self.uid
34 elsif command.kind_of?(Proc)
38 raise NotImplementedError