(define (make-dir-parents dir-path) (unless (access? dir-path F_OK) (make-dir-parents (dirname dir-path)) (mkdir dir-path))) (register-services (make #: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 "Cardano Testnet wallet" #:provides '(testnet-wallet) #:start (make-forkexec-constructor (list (string-append (getenv "HOME") "/.cabal/bin/cardano-wallet") "serve" "+RTS" "-T" "-RTS" "--port" "8091" "--node-socket" "/tmp/alinatn.socket" "--database" (string-append (getenv "HOME") "/test-cardano/testnet/wallet") "--testnet" (string-append (getenv "HOME") "/test-cardano/config/testnet-byron-genesis.json")) #: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-ssh))) (register-services (make #:docstring "Cardano Main network ssh tunnel" #: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 #:respawn? #t)) (register-services (make #:docstring "Mainnet wallet" #:provides '(mainnet-wallet) #:start (make-forkexec-constructor (list (string-append (getenv "HOME") "/.cabal/bin/cardano-wallet") "serve" "+RTS" "-T" "-RTS" "--node-socket" "/tmp/alinamn.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 '(mainnet-ssh)))