mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 00:29:43 -04:00
attempting to fix systemd definitions
This commit is contained in:
parent
5244e49665
commit
7594dfcbf3
1 changed files with 15 additions and 11 deletions
|
|
@ -44,14 +44,17 @@ in
|
|||
|
||||
|
||||
systemd.services.electrs = {
|
||||
Unit = {
|
||||
Description = "Electrs Bitcoin Indexer";
|
||||
After = [ "network.target" "bitcoind.service" ];
|
||||
Requires = [ "bitcoind.service" ];
|
||||
};
|
||||
Service = {
|
||||
ExecStartPre = "${pkgs.coreutils}/sleep 10";
|
||||
ExecStart = "${pkgs.electrs}/bin/electrs --conf=${conf}";
|
||||
description = "Electrs Bitcoin Indexer";
|
||||
|
||||
preStart = "${pkgs.coreutils}/sleep 5";
|
||||
script = "${pkgs.electrs}/bin/electrs";
|
||||
scriptArgs = "--config=${conf}";
|
||||
|
||||
after = [
|
||||
"bitcoind*.service"
|
||||
];
|
||||
|
||||
serviceConfig = {
|
||||
|
||||
User = "electrs";
|
||||
Group = "bitcoin";
|
||||
|
|
@ -62,9 +65,10 @@ in
|
|||
Restart = "always";
|
||||
RestartSec = 60;
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
requisite = [
|
||||
"bitcoind*.service"
|
||||
"network.target"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue