aboutsummaryrefslogtreecommitdiffstats
path: root/config/shepherd/init.d/cardano.scm
blob: b626cfcf036ba04f4d4d1189cc58cb19619db4d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
(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 "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 <service>
   #: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 <service>
   #: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 <service>
   #: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)))