From e97f570f69dd6328520cf35ffdea2844e2a9d682 Mon Sep 17 00:00:00 2001 From: Oscar Najera Date: Sun, 23 Apr 2023 19:19:56 +0200 Subject: remote services --- config/shepherd/init.d/bitcoin.scm | 19 +++++++++++++++++++ config/shepherd/init.d/cardano.scm | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/config/shepherd/init.d/bitcoin.scm b/config/shepherd/init.d/bitcoin.scm index 93f76a3..46c4ac0 100644 --- a/config/shepherd/init.d/bitcoin.scm +++ b/config/shepherd/init.d/bitcoin.scm @@ -40,3 +40,22 @@ "--noseedbackup")) #:stop (make-kill-destructor 2) ;; 2 is SIGINT - interupt process stream, ctrl-C #:respawn? #t)) + +;; ssh +(register-services + (make + #:docstring "Sarah ssh tunnel" + #:provides '(sarah-ssh) + #:start (make-forkexec-constructor + (list "ssh" "-NTv" + "-o" "ServerAliveInterval=60" + "-o" "ExitOnForwardFailure=yes" + "-o" "StreamLocalBindUnlink=yes" + "-L" "8335:localhost:8332" ;; btcm + "-L" "18335:localhost:18332" ;; btct + "-L" "8481:localhost:8480" ;; LNDT + "orchest@sarah") + #:log-file "/tmp/sarah-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)) diff --git a/config/shepherd/init.d/cardano.scm b/config/shepherd/init.d/cardano.scm index a35e563..dbe40d7 100644 --- a/config/shepherd/init.d/cardano.scm +++ b/config/shepherd/init.d/cardano.scm @@ -50,9 +50,9 @@ "cardano-wallet" "serve" "+RTS" "-T" "-RTS" - "--node-socket" "/tmp/nina-mn.socket" + "--node-socket" "/run/cardano-node-mainnet/socket" "--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 '(nina-ssh))) + #:requires '())) -- cgit v1.2.3