Work around services startup before ZFS pool

This commit is contained in:
coolneng 2021-05-21 01:27:27 +02:00
parent 7c3e61e51a
commit 000f56d295
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
1 changed files with 15 additions and 0 deletions

View File

@ -46,4 +46,19 @@ in {
requires = [ "systemd-udev-settle.service" ]; requires = [ "systemd-udev-settle.service" ];
after = [ "systemd-udev-settle.service" ]; after = [ "systemd-udev-settle.service" ];
}; };
# HACK: restart services dependent on ZFS afer mount
systemd.services.restart-services-mount = {
description = "Restart services after the ZFS dataset is mounted";
wantedBy = [ "default.target" ];
script = ''
sleep 5
systemctl restart syncthing
systemctl restart radicale
systemctl restart gitea
'';
serviceConfig.Type = "oneshot";
requires = [ "sata-hat.service" ];
after = [ "vault.mount" ];
};
} }