liquidd: use systemd startup notification
This commit is contained in:
parent
b83fd845c2
commit
49086abcc5
@ -159,10 +159,10 @@ in {
|
||||
lbtcnodeendpoint=${nbLib.addressWithPort liquidd.address bitcoind.whitelistedPort}
|
||||
''}
|
||||
'';
|
||||
in {
|
||||
in rec {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
requires = [ "bitcoind.service" ];
|
||||
after = [ "bitcoind.service" ];
|
||||
requires = [ "bitcoind.service" ] ++ optional cfg.btcpayserver.lbtc "liquidd.service";
|
||||
after = requires;
|
||||
preStart = ''
|
||||
install -m 600 ${configFile} '${cfg.nbxplorer.dataDir}/settings.config'
|
||||
{
|
||||
|
@ -168,6 +168,11 @@ let
|
||||
bitcoind = config.services.bitcoind;
|
||||
|
||||
configFile = pkgs.writeText "elements.conf" ''
|
||||
# We're already logging via journald
|
||||
nodebuglogfile=1
|
||||
|
||||
startupnotify=/run/current-system/systemd/bin/systemd-notify --ready
|
||||
|
||||
chain=${bitcoind.makeNetworkName "liquidv1" ''
|
||||
regtest
|
||||
[regtest]'' # Add [regtest] config section
|
||||
@ -253,7 +258,8 @@ in {
|
||||
} >> '${cfg.dataDir}/elements.conf'
|
||||
'';
|
||||
serviceConfig = nbLib.defaultHardening // {
|
||||
Type = "simple";
|
||||
Type = "notify";
|
||||
NotifyAccess = "all";
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
ExecStart = "${nbPkgs.elementsd}/bin/elementsd -datadir='${cfg.dataDir}'";
|
||||
|
Loading…
Reference in New Issue
Block a user