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}
|
lbtcnodeendpoint=${nbLib.addressWithPort liquidd.address bitcoind.whitelistedPort}
|
||||||
''}
|
''}
|
||||||
'';
|
'';
|
||||||
in {
|
in rec {
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
requires = [ "bitcoind.service" ];
|
requires = [ "bitcoind.service" ] ++ optional cfg.btcpayserver.lbtc "liquidd.service";
|
||||||
after = [ "bitcoind.service" ];
|
after = requires;
|
||||||
preStart = ''
|
preStart = ''
|
||||||
install -m 600 ${configFile} '${cfg.nbxplorer.dataDir}/settings.config'
|
install -m 600 ${configFile} '${cfg.nbxplorer.dataDir}/settings.config'
|
||||||
{
|
{
|
||||||
|
@ -168,6 +168,11 @@ let
|
|||||||
bitcoind = config.services.bitcoind;
|
bitcoind = config.services.bitcoind;
|
||||||
|
|
||||||
configFile = pkgs.writeText "elements.conf" ''
|
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" ''
|
chain=${bitcoind.makeNetworkName "liquidv1" ''
|
||||||
regtest
|
regtest
|
||||||
[regtest]'' # Add [regtest] config section
|
[regtest]'' # Add [regtest] config section
|
||||||
@ -253,7 +258,8 @@ in {
|
|||||||
} >> '${cfg.dataDir}/elements.conf'
|
} >> '${cfg.dataDir}/elements.conf'
|
||||||
'';
|
'';
|
||||||
serviceConfig = nbLib.defaultHardening // {
|
serviceConfig = nbLib.defaultHardening // {
|
||||||
Type = "simple";
|
Type = "notify";
|
||||||
|
NotifyAccess = "all";
|
||||||
User = cfg.user;
|
User = cfg.user;
|
||||||
Group = cfg.group;
|
Group = cfg.group;
|
||||||
ExecStart = "${nbPkgs.elementsd}/bin/elementsd -datadir='${cfg.dataDir}'";
|
ExecStart = "${nbPkgs.elementsd}/bin/elementsd -datadir='${cfg.dataDir}'";
|
||||||
|
Loading…
Reference in New Issue
Block a user