From 7d793603189f9d41c8ee87f8bb4c876440a1fce2 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 28 Oct 2024 16:38:53 -0500 Subject: Virtuoso: Setup basic database settings Set up basic database settings to ensure persistence of data across restarts. --- gn/services/databases.scm | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'gn') diff --git a/gn/services/databases.scm b/gn/services/databases.scm index ade82c1..91ac166 100644 --- a/gn/services/databases.scm +++ b/gn/services/databases.scm @@ -46,7 +46,16 @@ (checkpoint-interval virtuoso-configuration-checkpoint-interval (default "60")) (scheduler-interval virtuoso-configuration-scheduler-interval - (default "10"))) + (default "10")) + ;; Database settings + (database-file virtuoso-configuration-database-file + (default "/var/lib/virtuoso/virtuoso.db")) + (lock-file virtuoso-configuration-lock-file + (default "/var/lib/virtuoso/virtuoso.lck")) + (transaction-file virtuoso-configuration-transaction-file + (default "/var/lib/virtuoso/virtuoso.trx")) + (syslog virtuoso-configuration-syslog + (default "0"))) (define (virtuoso-activation config) (with-imported-modules '((guix build utils)) @@ -71,6 +80,7 @@ (home-directory "/var/lib/virtuoso") (shell (file-append shadow "/sbin/nologin"))))) + (define (virtuoso-shepherd-service config) (shepherd-service (documentation "Run Virtuoso.") @@ -104,7 +114,13 @@ (format port "[HTTPServer]~%") (format port "ServerPort = ~a:~a~%" #$(virtuoso-configuration-http-server-ip config) - #$(virtuoso-configuration-http-server-port config))))))) + #$(virtuoso-configuration-http-server-port config))) + (format port + "[Database]~%DatabaseFile = ~a~%LockFile = ~a~%TransactionFile = ~a~%Syslog = ~a~%" + #$(virtuoso-configuration-database-file config) + #$(virtuoso-configuration-lock-file config) + #$(virtuoso-configuration-transaction-file config) + #$(virtuoso-configuration-syslog config)))))) #:directory #$(virtuoso-configuration-state-directory config) #:user "virtuoso" #:group "virtuoso" -- cgit v1.2.3