aboutsummaryrefslogtreecommitdiff
path: root/whatmaps/command.py
diff options
context:
space:
mode:
Diffstat (limited to 'whatmaps/command.py')
-rwxr-xr-xwhatmaps/command.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/whatmaps/command.py b/whatmaps/command.py
index 7d17191..e28a8b9 100755
--- a/whatmaps/command.py
+++ b/whatmaps/command.py
@@ -129,6 +129,16 @@ def find_systemd_units(procmap, distro):
return units
+def filter_services(distro, services):
+ filtered = distro.filter_services(services)
+ diff = services - filtered
+ if len(diff):
+ logging.warning("Filtered out blacklisted service%s %s - restart manually",
+ 's' if len(diff) > 1 else '',
+ ', '.join(diff))
+ return filtered
+
+
def main(argv):
shared_objects = []
services = None
@@ -229,6 +239,8 @@ def main(argv):
else:
return 0
+ services = filter_services(distro, services)
+
if options.restart:
if options.print_cmds and services:
write_cmd_file(services, options.print_cmds, distro)