aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorÓscar Nájera <hi@oscarnajera.com>2022-04-17 14:08:09 +0200
committerÓscar Nájera <hi@oscarnajera.com>2022-04-17 14:08:09 +0200
commitff93ef6ef34fb293289d1d19d6af528187abbd47 (patch)
tree731b3113f7c48c90cee50a79c3e0dcdb966e7bd4
parent044b850f4b0df05f5b0cd95292acc7c34aecebba (diff)
downloaddotfiles-ff93ef6ef34fb293289d1d19d6af528187abbd47.tar.gz
dotfiles-ff93ef6ef34fb293289d1d19d6af528187abbd47.tar.bz2
dotfiles-ff93ef6ef34fb293289d1d19d6af528187abbd47.zip
Cardano services multi forwards single ssh
-rw-r--r--config/shepherd/init.d/cardano.scm40
1 files 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,14 +6,15 @@
(register-services
(make <service>
- #: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
@@ -21,20 +22,6 @@
(register-services
(make <service>
- #: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 <service>
#:docstring "Cardano Testnet wallet"
#:provides '(testnet-wallet)
#:start (make-forkexec-constructor
@@ -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 <service>
#: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 <service>
- #: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)))