aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-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))