From 51fa5968c16f2eb5069a9d7af24cef8dd04f8328 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Fri, 24 Sep 2021 17:46:11 +0200 Subject: Organize directories for cardano services --- config/shepherd/init.d/cardano.scm | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/config/shepherd/init.d/cardano.scm b/config/shepherd/init.d/cardano.scm index 4e73046..86cff60 100644 --- a/config/shepherd/init.d/cardano.scm +++ b/config/shepherd/init.d/cardano.scm @@ -1,6 +1,15 @@ + +(define (make-dir-parents dir-path) + (unless (access? dir-path F_OK) + (make-dir-parents (dirname dir-path)) + (mkdir dir-path))) + (let ((config-dir (string-append (getenv "HOME") "/.guix-profile/etc/conf/cardano/")) (db-dir (string-append (getenv "HOME") "/test-cardano/purple/"))) - (mkdir db-dir) + (for-each make-dir-parents (list db-dir + (string-append db-dir "log") + (string-append db-dir "wallet"))) + (register-services (make #:docstring "Alonzo Purple test network" @@ -12,7 +21,7 @@ "--port" "3005" "--config" (string-append config-dir "alonzo-purple-config.json") "--topology" (string-append config-dir "alonzo-purple-topology.json")) - #:log-file (string-append db-dir "/log/alonzo.log") + #:log-file (string-append db-dir "log/alonzo.log") ) #:stop (make-kill-destructor) #:respawn? #t)) @@ -25,8 +34,9 @@ (list (string-append (getenv "HOME") "/.cabal/bin/cardano-wallet") "serve" "--node-socket" (string-append db-dir "socket") - "--database" "/home/titan/dev/cardano/cardano-wallet/waldb" + "--database" (string-append db-dir "wallet") + "--token-metadata-server" "https://metadata.cardano-testnet.iohkdev.io" "--testnet" (string-append config-dir "alonzo-purple-byron-genesis.json")) - #:log-file (string-append db-dir "/log/alonzo-wallet.log")) + #:log-file (string-append db-dir "log/alonzo-wallet.log")) #:stop (make-kill-destructor) #:requires '(alonzo-purple-node)))) -- cgit v1.2.3