aboutsummaryrefslogtreecommitdiff
path: root/whatmaps
diff options
context:
space:
mode:
Diffstat (limited to 'whatmaps')
-rwxr-xr-xwhatmaps10
1 files changed, 5 insertions, 5 deletions
diff --git a/whatmaps b/whatmaps
index 81022f9..508f071 100755
--- a/whatmaps
+++ b/whatmaps
@@ -107,7 +107,7 @@ class Distro(object):
@classmethod
def restart_service(klass, service):
"""Restart a service"""
- raise NotImplementedError
+ subprocess.call(klass.restart_service_cmd(service))
@classmethod
def pkg_services(klass, pkg):
@@ -203,10 +203,6 @@ class DebianDistro(Distro):
return ['invoke-rc.d', name, 'restart']
@classmethod
- def restart_service(klass, name):
- subprocess.call(klass.restart_service_cmd(name))
-
- @classmethod
def has_apt(klass):
return True
@@ -347,6 +343,10 @@ class RedHatDistro(Distro):
pkg = output.strip()
return RpmPkg(pkg)
+ @classmethod
+ def restart_service_cmd(klass, name):
+ return ['service', name, 'restart']
+
class FedoraDistro(RedHatDistro):
id = 'Fedora'