added systemd service

This commit is contained in:
Bryan Ramos 2024-05-15 00:10:48 -04:00
parent 854c73624d
commit 5244e49665
Signed by: bryan
GPG key ID: 6ABDCD144D6643C8

View file

@ -43,28 +43,28 @@ 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}";
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}";
# User = "electrs";
# Group = "bitcoin";
User = "electrs";
Group = "bitcoin";
# Type = "simple";
# KillMode = "process";
# TimeoutSec = 60;
# Restart = "always";
# RestartSec = 60;
# };
# Install = {
# WantedBy = [ "multi-user.target" ];
# };
#};
Type = "simple";
KillMode = "process";
TimeoutSec = 60;
Restart = "always";
RestartSec = 60;
};
Install = {
WantedBy = [ "multi-user.target" ];
};
};
};
}