aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorÓscar Nájera <hi@oscarnajera.com>2022-08-07 13:38:04 +0200
committerÓscar Nájera <hi@oscarnajera.com>2022-08-07 13:38:04 +0200
commitd38d75f71eea951dccb1ac31ab470704f3f23c74 (patch)
treeca8bb6da7853e2347381b42cd86e80e21c747235
parent2d313befdbce83ab3673e3c57e2fd1828da91df1 (diff)
downloaddotfiles-d38d75f71eea951dccb1ac31ab470704f3f23c74.tar.gz
dotfiles-d38d75f71eea951dccb1ac31ab470704f3f23c74.tar.bz2
dotfiles-d38d75f71eea951dccb1ac31ab470704f3f23c74.zip
btc testnet services
-rw-r--r--config/shepherd/init.d/bitcoin.scm48
1 files changed, 48 insertions, 0 deletions
diff --git a/config/shepherd/init.d/bitcoin.scm b/config/shepherd/init.d/bitcoin.scm
new file mode 100644
index 0000000..800ac9d
--- /dev/null
+++ b/config/shepherd/init.d/bitcoin.scm
@@ -0,0 +1,48 @@
+
+(define (make-dir-parents dir-path)
+ (unless (access? dir-path F_OK)
+ (make-dir-parents (dirname dir-path))
+ (mkdir dir-path)))
+
+(register-services
+ (make <service>
+ #:docstring "Bitcoin local testnet"
+ #:provides '(bitcoin-testnet)
+ #:start (make-forkexec-constructor
+ (list "bitcoind")
+ #:log-file "/tmp/bitcoind.log")
+ #:stop (make-kill-destructor 2) ;; 2 is SIGINT - interupt process stream, ctrl-C
+ #:respawn? #t))
+
+(register-services
+ (make <service>
+ #:docstring "Electrs testnet"
+ #:provides '(electrs-testnet)
+ #:start (make-forkexec-constructor
+ (list "/home/titan/dev/bitcoin/electrs/target/release/electrs"
+ "--conf" "/home/titan/dev/bitcoin/electrs/testnet-conf.toml")
+ #:log-file "/tmp/electrs.log")
+ #:stop (make-kill-destructor 2) ;; 2 is SIGINT - interupt process stream, ctrl-C
+ #:respawn? #t))
+
+(register-services
+ (make <service>
+ #:docstring "Bitcoin testnet index"
+ #:provides '(index-testnet)
+ #:start (make-forkexec-constructor
+ (list "/home/titan/dev/bitcoin/rust-bitcoin-indexer/target/release/bitcoin-indexer")
+ #:directory "/home/titan/dev/bitcoin/rust-bitcoin-indexer/"
+ #:log-file "/tmp/btc-indexer.log")
+ #:stop (make-kill-destructor 2) ;; 2 is SIGINT - interupt process stream, ctrl-C
+ #:respawn? #t))
+
+(register-services
+ (make <service>
+ #:docstring "Bitcoin testnet lnd lightning"
+ #:provides '(lnd-testnet)
+ #:start (make-forkexec-constructor
+ (list "lnd"
+ "--lnddir=/run/media/titan/ext_backup/personal/bitcoin/lnd/"
+ "--noseedbackup"))
+ #:stop (make-kill-destructor 2) ;; 2 is SIGINT - interupt process stream, ctrl-C
+ #:respawn? #t))