Reinitialize HDDs properly after service restart

This commit is contained in:
coolneng 2022-11-14 11:48:26 +01:00
parent 0864532f54
commit bc55759f84
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
1 changed files with 3 additions and 3 deletions

View File

@ -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" ];