]> git.proxmox.com Git - pmg-api.git/commitdiff
pbs: schedule: stop timer immediately on removal
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 18 Nov 2020 15:54:22 +0000 (16:54 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 18 Nov 2020 15:54:22 +0000 (16:54 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PMG/PBSSchedule.pm

index 92de542e6d865c75c287ea9836e6926e1848ea33..740b1608dfdd4fd235351830a860e9b6687a8f78 100644 (file)
@@ -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']);