From bc55759f8482d6bd09653651007fdbb5063c7e25 Mon Sep 17 00:00:00 2001 From: coolneng Date: Mon, 14 Nov 2022 11:48:26 +0100 Subject: [PATCH] Reinitialize HDDs properly after service restart --- modules/periodic.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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" ];