summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-03-12 19:10:44 +0100
committerLudovic Courtès <ludo@gnu.org>2015-03-12 19:10:44 +0100
commit9751c39a6d493535d3866f536fed8b16b5a4f1f8 (patch)
treee6fb720f9b06eb89fe0af3734d01ce03411a6d58 /gnu
parent9a10acc9860d649f4b17c7d84ea685a98ba54b3f (diff)
downloadguix-9751c39a6d493535d3866f536fed8b16b5a4f1f8.tar.gz
services: bitlbee: Make /var/lib/bitlbee when activating.
* gnu/services/networking.scm (bitlbee-service): Add 'activate' field.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/services/networking.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index a2d8e3a045..af8dd43bd6 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -286,6 +286,14 @@ configuration file."
      (service
       (provision '(bitlbee))
       (requirement '(user-processes loopback))
+      (activate #~(begin
+                    (use-modules (guix build utils))
+
+                    ;; This directory is used to store OTR data.
+                    (mkdir-p "/var/lib/bitlbee")
+                    (let ((user (getpwnam "bitlbee")))
+                      (chown "/var/lib/bitlbee"
+                             (passwd:uid user) (passwd:gid user)))))
       (start #~(make-forkexec-constructor
                 (list (string-append #$bitlbee "/sbin/bitlbee")
                       "-n" "-F" "-u" "bitlbee" "-c" #$conf)))