diff options
author | methuselah-0 <[email protected]> | 2021-04-11 10:30:01 +0200 |
---|---|---|
committer | Leo Prikler <[email protected]> | 2021-04-27 20:45:35 +0200 |
commit | 3802bb0ba027b5e792dc7cbecabaf19889acdc7b (patch) | |
tree | 68d417300d43385ea08995ea5b186ffb00e1b284 /gnu | |
parent | 1f5543e7ff5db3f085edb5d6aa150be29bb4af43 (diff) |
services: mysql: Add extra-environment as configuration option.
* gnu/services/databases.scm (mysql-configuration): Add extra-environment
(mysql-service): Use #:log-file and #:environment-variables
* doc/guix.texi: Document it.
Signed-off-by: Leo Prikler <[email protected]>
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/services/databases.scm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm index 4a6d36b50b..eba88cdb68 100644 --- a/gnu/services/databases.scm +++ b/gnu/services/databases.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2018 Julien Lepiller <[email protected]> ;;; Copyright © 2019 Robert Vollmert <[email protected]> ;;; Copyright © 2020 Marius Bakke <[email protected]> +;;; Copyright © 2021 David Larsson <[email protected]> ;;; ;;; This file is part of GNU Guix. ;;; @@ -527,6 +528,7 @@ created after the PostgreSQL database is started."))) (port mysql-configuration-port (default 3306)) (socket mysql-configuration-socket (default "/run/mysqld/mysqld.sock")) (extra-content mysql-configuration-extra-content (default "")) + (extra-environment mysql-configuration-extra-environment (default #~'())) (auto-upgrade? mysql-configuration-auto-upgrade? (default #t))) (define %mysql-accounts @@ -611,11 +613,14 @@ FLUSH PRIVILEGES; (provision '(mysql)) (documentation "Run the MySQL server.") (start (let ((mysql (mysql-configuration-mysql config)) + (extra-env (mysql-configuration-extra-environment config)) (my.cnf (mysql-configuration-file config))) #~(make-forkexec-constructor (list (string-append #$mysql "/bin/mysqld") (string-append "--defaults-file=" #$my.cnf)) - #:user "mysql" #:group "mysql"))) + #:user "mysql" #:group "mysql" + #:log-file "/var/log/mysqld.log" + #:environment-variables #$extra-env))) (stop #~(make-kill-destructor))))) (define (mysql-upgrade-wrapper mysql socket-file) |