summary refs log tree commit diff
path: root/gnu/services/web.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/services/web.scm')
-rw-r--r--gnu/services/web.scm66
1 files changed, 36 insertions, 30 deletions
diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index b144cf7076..5bac496f01 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -1393,7 +1393,7 @@ files.")
   (replacement       anonip-configuration-replacement  ;string
                      (default #f))
   (ipv4mask          anonip-configuration-ipv4mask     ;number
-                     (default #f)) 
+                     (default #f))
   (ipv6mask          anonip-configuration-ipv6mask     ;number
                      (default #f))
   (increment         anonip-configuration-increment    ;number
@@ -1425,35 +1425,41 @@ files.")
                          (format #false "~a=~a"
                                  option value))))
                (list)))))
-    (list (shepherd-service
-           (provision (list (symbol-append 'anonip- (string->symbol output))))
-           (requirement '(user-processes))
-           (documentation "Anonimyze the given log file location with anonip.")
-           (start #~(lambda _
-                      (unless (file-exists? #$input)
-                          (mknod #$input 'fifo #o600 0))
-                      (let ((pid (fork+exec-command
-                                  (append
-                                      (list #$(file-append (anonip-configuration-anonip config)
-                                                           "/bin/anonip")
-                                            (string-append "--input=" #$input)
-                                            (string-append "--output=" #$output))
-                                      (if #$(anonip-configuration-skip-private? config)
-                                          '("--skip-private") (list))
-                                    '#$(optional anonip-configuration-column "--column")
-                                    '#$(optional anonip-configuration-ipv4mask "--ipv4mask")
-                                    '#$(optional anonip-configuration-ipv6mask "--ipv6mask")
-                                    '#$(optional anonip-configuration-increment "--increment")
-                                    '#$(optional anonip-configuration-replacement "--replacement")
-                                    '#$(optional anonip-configuration-delimiter "--delimiter")
-                                    '#$(optional anonip-configuration-regex "--regex"))
-                                  ;; Run in a UTF-8 locale
-                                  #:environment-variables
-                                  (list (string-append "GUIX_LOCPATH=" #$glibc-utf8-locales
-                                                       "/lib/locale")
-                                        "LC_ALL=en_US.utf8"))))
-                        pid)))
-           (stop #~(make-kill-destructor))))))
+    (list
+     (shepherd-service
+      (provision
+       (list (symbol-append 'anonip- (string->symbol output))))
+      (requirement '(user-processes))
+      (documentation
+       "Anonimyze the given log file location with anonip.")
+      (start
+       #~(lambda _
+           (unless (file-exists? #$input)
+             (mknod #$input 'fifo #o600 0))
+           (let ((pid
+                  (fork+exec-command
+                   (append
+                    (list #$(file-append (anonip-configuration-anonip config)
+                                         "/bin/anonip")
+                          (string-append "--input=" #$input)
+                          (string-append "--output=" #$output))
+                    (if #$(anonip-configuration-skip-private? config)
+                        '("--skip-private") (list))
+                    '#$(optional anonip-configuration-column "--column")
+                    '#$(optional anonip-configuration-ipv4mask "--ipv4mask")
+                    '#$(optional anonip-configuration-ipv6mask "--ipv6mask")
+                    '#$(optional anonip-configuration-increment "--increment")
+                    '#$(optional anonip-configuration-replacement
+                                 "--replacement")
+                    '#$(optional anonip-configuration-delimiter "--delimiter")
+                    '#$(optional anonip-configuration-regex "--regex"))
+                   ;; Run in a UTF-8 locale
+                   #:environment-variables
+                   (list (string-append "GUIX_LOCPATH=" #$glibc-utf8-locales
+                                        "/lib/locale")
+                         "LC_ALL=en_US.utf8"))))
+             pid)))
+      (stop #~(make-kill-destructor))))))
 
 (define anonip-service-type
   (service-type