From: Thomas Lamprecht Date: Wed, 18 Nov 2020 15:54:22 +0000 (+0100) Subject: pbs: schedule: stop timer immediately on removal X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=2c5630ce703172f8cf1a04b157ea121f85028b70;p=pmg-api.git pbs: schedule: stop timer immediately on removal Signed-off-by: Thomas Lamprecht --- 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']);