From ff93ef6ef34fb293289d1d19d6af528187abbd47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Sun, 17 Apr 2022 14:08:09 +0200 Subject: Cardano services multi forwards single ssh --- config/shepherd/init.d/cardano.scm | 40 +++++++------------------------------- 1 file changed, 7 insertions(+), 33 deletions(-) diff --git a/config/shepherd/init.d/cardano.scm b/config/shepherd/init.d/cardano.scm index a597f30..b626cfc 100644 --- a/config/shepherd/init.d/cardano.scm +++ b/config/shepherd/init.d/cardano.scm @@ -6,33 +6,20 @@ (register-services (make - #:docstring "Cardano Test network ssh tunnel" - #:provides '(testnet-node-ssh) + #:docstring "Cardano Test network ssh tunnel, node & psql" + #:provides '(testnet-ssh) #:start (make-forkexec-constructor (list "ssh" "-NTv" "-o" "ServerAliveInterval=60" "-o" "ExitOnForwardFailure=yes" "-o" "StreamLocalBindUnlink=yes" "-L" "/tmp/alinatn.socket:/run/cardano-node-testnet/socket" + "-L" "54321:localhost:5432" "cardano@alina") #:log-file "/tmp/testnet-ssh.log") #:stop (make-kill-destructor 2) ;; 2 is SIGINT - interupt process stream, ctrl-C #:respawn? #t)) -(register-services - (make - #:docstring "Alina Postgresql ssh" - #:provides '(alina-postgresql-ssh) - #:start (make-forkexec-constructor - (list "ssh" "-NTv" - "-o" "ServerAliveInterval=60" - "-o" "ExitOnForwardFailure=yes" - "-L" "54320:localhost:5432" - "cardano@alina") - #:log-file "/tmp/testnet-psql-ssh.log") - #:stop (make-kill-destructor 2) ;; 2 is SIGINT - interupt process stream, ctrl-C - #:respawn? #t)) - (register-services (make #:docstring "Cardano Testnet wallet" @@ -48,18 +35,19 @@ #:log-file (string-append (getenv "HOME") "/test-cardano/testnet/log/wallet.log")) #:stop (make-kill-destructor 2) ;; 2 is SIGINT - interupt process stream, ctrl-C - #:requires '(testnet-node-ssh))) + #:requires '(testnet-ssh))) (register-services (make #:docstring "Cardano Main network ssh tunnel" - #:provides '(mainnet-node-ssh) + #:provides '(mainnet-ssh) #:start (make-forkexec-constructor (list "ssh" "-NTv" "-o" "ServerAliveInterval=60" "-o" "ExitOnForwardFailure=yes" "-o" "StreamLocalBindUnlink=yes" "-L" "/tmp/alinamn.socket:/run/cardano-node-mainnet/socket" + "-L" "54320:localhost:5432" "cardano@nina") #:log-file "/tmp/mainnet-ssh.log") #:stop (make-kill-destructor 2) ;; 2 is SIGINT - interupt process stream, ctrl-C @@ -79,18 +67,4 @@ #: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 '(mainnet-node-ssh))) - -(register-services - (make - #:docstring "Mainnet Postgresql ssh" - #:provides '(mainnet-postgresql-ssh) - #:start (make-forkexec-constructor - (list "ssh" "-NTv" - "-o" "ServerAliveInterval=60" - "-o" "ExitOnForwardFailure=yes" - "-L" "54320:localhost:5432" - "cardano@nina") - #:log-file "/tmp/mainnet-psql-ssh.log") - #:stop (make-kill-destructor 2) ;; 2 is SIGINT - interupt process stream, ctrl-C - #:respawn? #t)) + #:requires '(mainnet-ssh))) -- cgit v1.2.3