Merge pull request #2758 from lonerr/service

FreeBSD startup scripts (rc) supports optional arguments.
reviewable/pr18780/r1
Michael DeHaan 12 years ago
commit 1ff82e88d2

@ -600,7 +600,7 @@ class FreeBsdService(Service):
self.module.fail_json(msg='unable to find service binary') self.module.fail_json(msg='unable to find service binary')
def get_service_status(self): def get_service_status(self):
rc, stdout, stderr = self.execute_command("%s %s %s" % (self.svc_cmd, self.name, 'onestatus')) rc, stdout, stderr = self.execute_command("%s %s %s %s" % (self.svc_cmd, self.name, 'onestatus', self.arguments))
if rc == 1: if rc == 1:
self.running = False self.running = False
elif rc == 0: elif rc == 0:
@ -630,7 +630,7 @@ class FreeBsdService(Service):
if self.action is "reload": if self.action is "reload":
self.action = "onereload" self.action = "onereload"
return self.execute_command("%s %s %s" % (self.svc_cmd, self.name, self.action)) return self.execute_command("%s %s %s %s" % (self.svc_cmd, self.name, self.action, self.arguments))
# =========================================== # ===========================================
# Subclass: OpenBSD # Subclass: OpenBSD

Loading…
Cancel
Save