From 53ac47cbae05d4afb641c5e4875f6fda0759308f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C3=A9cureuil?= Date: Sun, 10 Jan 2021 16:06:50 +0100 Subject: reload_or_restart: Do not check if the service is a systemd service or not. Systemd know how to handle sysvinit services as well as systemd service. This wasn't working because we were checking /sys/fs/cgroup/systemd which does not exist anymore. --- NEWS | 1 + common/Wizcommon.pm | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index 903fb6e1..8ef28b33 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ +- Fix restarting services with current systemd - Fix proftpd default config file to handle the case when indent module is not available. diff --git a/common/Wizcommon.pm b/common/Wizcommon.pm index e9eeaa09..e6a23c5b 100644 --- a/common/Wizcommon.pm +++ b/common/Wizcommon.pm @@ -50,11 +50,7 @@ sub check_started { sub reload_or_restart { my ($service) = @_; - if (run_program::rooted($::prefix, '/bin/mountpoint', '-q', '/sys/fs/cgroup/systemd')) { - run_program::rooted($::prefix, '/bin/systemctl', 'reload-or-restart', "$service.service"); - } else { - run_program::rooted($::prefix, "/etc/rc.d/init.d/$service", "restart"); - } + run_program::rooted($::prefix, '/bin/systemctl', 'reload-or-restart', "$service.service"); } sub check_starts_on_boot($$) { -- cgit v1.2.1