From 6c7c28b7cb41b4195718e2edb968e4ea9b80929a Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Thu, 18 Apr 2024 17:00:00 -0400 Subject: [PATCH] snap: bitcoin-core service app --- snap/snapcraft.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index c3bdc28..9fd9ee7 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -11,6 +11,17 @@ confinement: strict base: core18 apps: + service: + command: bitcoind -startupnotify='systemd-notify --ready' -shutdownnotify='systemd-notify --stopping' + daemon: notify + plugs: [home, removable-media, network, network-bind] + environment: + # Override HOME so the datadir is located at + # ~/snap/bitcoin-core/common/.bitcoin/ instead of + # ~/snap/bitcoin-core/current/.bitcoin/, and each new version of the + # snap won't have a different data directory: + # https://docs.snapcraft.io/environment-variables/7983 + HOME: $SNAP_USER_COMMON daemon: command: bitcoind plugs: [home, removable-media, network, network-bind]