Merge pull request #256 from SkaveRat/patch-restart
svc: Fix missing restart method
This commit is contained in:
commit
0221eba5ec
1 changed files with 3 additions and 0 deletions
|
@ -191,6 +191,9 @@ class Svc(object):
|
||||||
def reload(self):
|
def reload(self):
|
||||||
return self.execute_command([self.svc_cmd, '-1', self.svc_full])
|
return self.execute_command([self.svc_cmd, '-1', self.svc_full])
|
||||||
|
|
||||||
|
def restart(self):
|
||||||
|
return self.execute_command([self.svc_cmd, '-t', self.svc_full])
|
||||||
|
|
||||||
def execute_command(self, cmd):
|
def execute_command(self, cmd):
|
||||||
try:
|
try:
|
||||||
(rc, out, err) = self.module.run_command(' '.join(cmd))
|
(rc, out, err) = self.module.run_command(' '.join(cmd))
|
||||||
|
|
Loading…
Reference in a new issue