diff --git a/modules/periodic.nix b/modules/periodic.nix index 53dd712..cbea93b 100644 --- a/modules/periodic.nix +++ b/modules/periodic.nix @@ -38,12 +38,12 @@ in { script = '' ${pkgs.bash}/bin/bash -c "/home/coolneng/system/scripts/SATA-hat.sh on" ''; - preStop = '' - ${pkgs.bash}/bin/bash -c "/home/coolneng/system/scripts/SATA-hat.sh off" - ''; serviceConfig = { Type = "oneshot"; RemainAfterExit = "yes"; + ExecStop = '' + ${pkgs.bash}/bin/bash -c "/home/coolneng/system/scripts/SATA-hat.sh off" + ''; }; before = [ "zfs-import.target" "zfs-import-vault.service" "umount.target" ]; requires = [ "systemd-udev-settle.service" ];