aboutsummaryrefslogtreecommitdiffstats
path: root/config/shepherd/init.d/cardano.scm
diff options
context:
space:
mode:
Diffstat (limited to 'config/shepherd/init.d/cardano.scm')
-rw-r--r--config/shepherd/init.d/cardano.scm45
1 files changed, 10 insertions, 35 deletions
diff --git a/config/shepherd/init.d/cardano.scm b/config/shepherd/init.d/cardano.scm
index 1c5b731..1fc1d6f 100644
--- a/config/shepherd/init.d/cardano.scm
+++ b/config/shepherd/init.d/cardano.scm
@@ -1,33 +1,9 @@
-
-(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 "Nina ssh tunnel, Cardano nodes"
- #:provides '(nina-ssh)
- #:start (make-forkexec-constructor
- (list "ssh" "-NTv"
- "-o" "ServerAliveInterval=60"
- "-o" "ExitOnForwardFailure=yes"
- "-o" "StreamLocalBindUnlink=yes"
- "-L" "/tmp/nina-mn.socket:/run/cardano-node-mainnet/socket"
- "-L" "/tmp/nina-pr.socket:/run/cardano-node-preview/socket"
- "-L" "54320:localhost:5432"
- "-L" "50001:localhost:50001" ;; electrs
- "-L" "24224:localhost:24224" ;; electrs monitoring
- "cardano@nina")
- #:log-file "/tmp/nina-ssh.log"
- #:environment-variables '("SSH_AUTH_SOCK=/run/user/1000/gnupg/S.gpg-agent.ssh"))
- #:stop (make-kill-destructor 2) ;; 2 is SIGINT - interupt process stream, ctrl-C
- #:respawn? #t))
+ (list
-(register-services
- (make <service>
- #:docstring "Cardano preview wallet"
- #:provides '(preview-wallet)
+ (service
+ '(preview-wallet)
+ #:documentation "Cardano preview wallet"
#:start (make-forkexec-constructor
(list "cardano-wallet"
;;(string-append (getenv "HOME") "/.cabal/bin/cardano-wallet")
@@ -39,12 +15,11 @@
#:log-file (string-append (getenv "HOME") "/test-cardano/preview/log/wallet.log"))
#:stop (make-kill-destructor 2) ;; 2 is SIGINT - interupt process stream, ctrl-C
- #:requires '(nina-ssh)))
+ #:requirement '(nina-ssh))
-(register-services
- (make <service>
- #:docstring "Mainnet wallet"
- #:provides '(mainnet-wallet)
+ (service
+ '(mainnet-wallet)
+ #:documentation "Mainnet wallet"
#:start (make-forkexec-constructor
(list ;;(string-append (getenv "HOME") "/.cabal/bin/cardano-wallet")
"cardano-wallet"
@@ -53,5 +28,5 @@
"--database" (string-append (getenv "HOME") "/test-cardano/main/wallet")
"--mainnet")
#:log-file (string-append (getenv "HOME") "/test-cardano/main/log/wallet.log"))
- #:stop (make-kill-destructor 2) ;; 2 is SIGINT - interupt process stream, ctrl-C
- #:requires '()))
+ ;; 2 is SIGINT - interupt process stream, ctrl-C
+ #:stop (make-kill-destructor 2))))