From 2c5630ce703172f8cf1a04b157ea121f85028b70 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 18 Nov 2020 16:54:22 +0100 Subject: [PATCH] pbs: schedule: stop timer immediately on removal Signed-off-by: Thomas Lamprecht --- src/PMG/PBSSchedule.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PMG/PBSSchedule.pm b/src/PMG/PBSSchedule.pm index 92de542..740b160 100644 --- a/src/PMG/PBSSchedule.pm +++ b/src/PMG/PBSSchedule.pm @@ -123,7 +123,7 @@ sub delete_schedule { my $timer_unit_path = "/etc/systemd/system/$timer_unit"; eval { - run_command(['systemctl', 'disable', $timer_unit]); + run_command(['systemctl', 'disable', '--now', $timer_unit]); unlink($timer_unit_path) || die "delete '$timer_unit_path' failed - $!\n"; run_command(['systemctl', 'daemon-reload']); -- 2.39.2