Merge pull request #251 from davidfritzsche/patch-1
Add working status detection for pf on FreeBSD i'm going to merge this to give you a usable workaround, still I consider this a bug in the init script.
This commit is contained in:
commit
61f664bc47
1 changed files with 7 additions and 4 deletions
|
@ -928,10 +928,13 @@ class FreeBsdService(Service):
|
|||
|
||||
def get_service_status(self):
|
||||
rc, stdout, stderr = self.execute_command("%s %s %s %s" % (self.svc_cmd, self.name, 'onestatus', self.arguments))
|
||||
if rc == 1:
|
||||
self.running = False
|
||||
elif rc == 0:
|
||||
self.running = True
|
||||
if self.name == "pf":
|
||||
self.running = "Enabled" in stdout
|
||||
else:
|
||||
if rc == 1:
|
||||
self.running = False
|
||||
elif rc == 0:
|
||||
self.running = True
|
||||
|
||||
def service_enable(self):
|
||||
if self.enable:
|
||||
|
|
Loading…
Add table
Reference in a new issue