Reinitialize HDDs properly after service restart
This commit is contained in:
parent
0864532f54
commit
bc55759f84
|
@ -38,12 +38,12 @@ in {
|
||||||
script = ''
|
script = ''
|
||||||
${pkgs.bash}/bin/bash -c "/home/coolneng/system/scripts/SATA-hat.sh on"
|
${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 = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
RemainAfterExit = "yes";
|
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" ];
|
before = [ "zfs-import.target" "zfs-import-vault.service" "umount.target" ];
|
||||||
requires = [ "systemd-udev-settle.service" ];
|
requires = [ "systemd-udev-settle.service" ];
|
||||||
|
|
Loading…
Reference in New Issue