attempting to fix systemd definitions

This commit is contained in:
Bryan Ramos 2024-05-15 00:23:08 -04:00
parent 5244e49665
commit 7594dfcbf3
Signed by: bryan
GPG key ID: 6ABDCD144D6643C8

View file

@ -44,14 +44,17 @@ in
systemd.services.electrs = { systemd.services.electrs = {
Unit = { description = "Electrs Bitcoin Indexer";
Description = "Electrs Bitcoin Indexer";
After = [ "network.target" "bitcoind.service" ]; preStart = "${pkgs.coreutils}/sleep 5";
Requires = [ "bitcoind.service" ]; script = "${pkgs.electrs}/bin/electrs";
}; scriptArgs = "--config=${conf}";
Service = {
ExecStartPre = "${pkgs.coreutils}/sleep 10"; after = [
ExecStart = "${pkgs.electrs}/bin/electrs --conf=${conf}"; "bitcoind*.service"
];
serviceConfig = {
User = "electrs"; User = "electrs";
Group = "bitcoin"; Group = "bitcoin";
@ -62,9 +65,10 @@ in
Restart = "always"; Restart = "always";
RestartSec = 60; RestartSec = 60;
}; };
Install = { requisite = [
WantedBy = [ "multi-user.target" ]; "bitcoind*.service"
}; "network.target"
];
}; };
}; };
} }