~ruther/guix-local

9751c39a6d493535d3866f536fed8b16b5a4f1f8 — Ludovic Courtès 11 years ago 9a10acc
services: bitlbee: Make /var/lib/bitlbee when activating.

* gnu/services/networking.scm (bitlbee-service): Add 'activate' field.
1 files changed, 8 insertions(+), 0 deletions(-)

M gnu/services/networking.scm
M gnu/services/networking.scm => gnu/services/networking.scm +8 -0
@@ 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)))