From 02425de99093c944e286d822e8a3c7e21cb21dd3 Mon Sep 17 00:00:00 2001 From: openoms Date: Tue, 21 Dec 2021 15:33:41 +0000 Subject: [PATCH] lnd.service: avoid hanging on stop #2827 --- home.admin/assets/lnd.service | 8 ++------ home.admin/config.scripts/lnd.install.sh | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/home.admin/assets/lnd.service b/home.admin/assets/lnd.service index 10d679318..e5def985d 100644 --- a/home.admin/assets/lnd.service +++ b/home.admin/assets/lnd.service @@ -14,7 +14,8 @@ After=bitcoind.service [Service] ExecStartPre=-/home/admin/config.scripts/lnd.check.sh prestart mainnet ExecStart=/usr/local/bin/lnd --configfile=/home/bitcoin/.lnd/lnd.conf -ExecStop=/usr/local/bin/lncli stop +# avoid hanging on stop +# ExecStop=/usr/local/bin/lncli stop PIDFile=/home/bitcoin/.lnd/lnd.pid User=bitcoin @@ -39,21 +40,16 @@ StandardError=journal # Hardening Measures #################### - # Mount /usr, /boot/ and /etc read-only for the process. ProtectSystem=full - # Disallow the process and all of its children to gain # new privileges through execve(). NoNewPrivileges=true - # Use a new /dev namespace only populated with API pseudo devices # such as /dev/null, /dev/zero and /dev/random. PrivateDevices=true - # Deny the creation of writable and executable memory mappings. MemoryDenyWriteExecute=true - PrivateTmp=true [Install] diff --git a/home.admin/config.scripts/lnd.install.sh b/home.admin/config.scripts/lnd.install.sh index 8222da6f5..c0256b39b 100644 --- a/home.admin/config.scripts/lnd.install.sh +++ b/home.admin/config.scripts/lnd.install.sh @@ -289,7 +289,8 @@ EnvironmentFile=/mnt/hdd/raspiblitz.conf ExecStartPre=-/home/admin/config.scripts/lnd.check.sh prestart ${CHAIN} ExecStart=/usr/local/bin/lnd --configfile=/home/bitcoin/.lnd/${netprefix}lnd.conf -ExecStop=/usr/local/bin/lncli -n=${CHAIN} --rpcserver localhost:1${rpcportmod}009 stop +# avoid hanging on stop +# ExecStop=/usr/local/bin/lncli -n=${CHAIN} --rpcserver localhost:1${rpcportmod}009 stop PIDFile=/home/bitcoin/.lnd/${netprefix}lnd.pid User=bitcoin @@ -313,21 +314,16 @@ StandardError=journal # Hardening Measures #################### - # Mount /usr, /boot/ and /etc read-only for the process. ProtectSystem=full - # Disallow the process and all of its children to gain # new privileges through execve(). NoNewPrivileges=true - # Use a new /dev namespace only populated with API pseudo devices # such as /dev/null, /dev/zero and /dev/random. PrivateDevices=true - # Deny the creation of writable and executable memory mappings. MemoryDenyWriteExecute=true - PrivateTmp=true [Install]