summaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-01-20 14:44:34 +0100
committerLudovic Courtès <ludo@gnu.org>2017-01-20 21:39:17 +0100
commitbe051880c435d19e7788d5df56c062f7797e0a49 (patch)
tree7fc41058c69e59cb947bd8821bfaec86adc04bd2 /gnu/services
parent830d4c1fcdff7be199e66cd70a5048264b54a151 (diff)
downloadpatches-be051880c435d19e7788d5df56c062f7797e0a49.tar
patches-be051880c435d19e7788d5df56c062f7797e0a49.tar.gz
services: Reindent vpn.scm.
This fixes indentation of 'match' forms. * gnu/services/vpn.scm: Pass through 'indent-code.el'.
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/vpn.scm70
1 files changed, 35 insertions, 35 deletions
diff --git a/gnu/services/vpn.scm b/gnu/services/vpn.scm
index c21995453e..f577e0851e 100644
--- a/gnu/services/vpn.scm
+++ b/gnu/services/vpn.scm
@@ -46,11 +46,11 @@
(define (uglify-field-name name)
(match name
- ('verbosity "verb")
- (_ (let ((str (symbol->string name)))
- (if (string-suffix? "?" str)
- (substring str 0 (1- (string-length str)))
- str)))))
+ ('verbosity "verb")
+ (_ (let ((str (symbol->string name)))
+ (if (string-suffix? "?" str)
+ (substring str 0 (1- (string-length str)))
+ str)))))
(define (serialize-field field-name val)
(if (eq? field-name 'pid-file)
@@ -108,8 +108,8 @@
(define (serialize-tls-auth role location)
(serialize-field 'tls-auth
(string-append location " " (match role
- ('server "0")
- ('client "1")))))
+ ('server "0")
+ ('client "1")))))
(define (tls-auth? val)
(or (eq? val #f)
(string? val)))
@@ -230,10 +230,10 @@ client. Each file is named after the name of the client."
(for-each
(lambda (ccd)
(match ccd
- ((name config-string)
- (call-with-output-file
- (string-append #$output "/" name)
- (lambda (port) (display config-string port))))))
+ ((name config-string)
+ (call-with-output-file
+ (string-append #$output "/" name)
+ (lambda (port) (display config-string port))))))
'#$files))))))
(define-syntax define-split-configuration
@@ -378,53 +378,53 @@ is trunkated and rewritten every minute.")
(lambda ()
(serialize-configuration config
(match role
- ('server
- openvpn-server-configuration-fields)
- ('client
- openvpn-client-configuration-fields))))))
+ ('server
+ openvpn-server-configuration-fields)
+ ('client
+ openvpn-client-configuration-fields))))))
(ccd-dir (match role
- ('server (create-ccd-directory
- (openvpn-server-configuration-client-config-dir
- config)))
- ('client #f))))
+ ('server (create-ccd-directory
+ (openvpn-server-configuration-client-config-dir
+ config)))
+ ('client #f))))
(computed-file "openvpn.conf"
#~(begin
(use-modules (ice-9 match))
(call-with-output-file #$output
(lambda (port)
(match '#$role
- ('server (display "" port))
- ('client (display "client\n" port)))
+ ('server (display "" port))
+ ('client (display "client\n" port)))
(display #$config-str port)
(match '#$role
- ('server (display
- (string-append "client-config-dir "
- #$ccd-dir "\n") port))
- ('client (display "" port)))))))))
+ ('server (display
+ (string-append "client-config-dir "
+ #$ccd-dir "\n") port))
+ ('client (display "" port)))))))))
(define (openvpn-shepherd-service role)
(lambda (config)
(let* ((config-file (openvpn-config-file role config))
(pid-file ((match role
- ('server openvpn-server-configuration-pid-file)
- ('client openvpn-client-configuration-pid-file))
+ ('server openvpn-server-configuration-pid-file)
+ ('client openvpn-client-configuration-pid-file))
config))
(openvpn ((match role
- ('server openvpn-server-configuration-openvpn)
- ('client openvpn-client-configuration-openvpn))
+ ('server openvpn-server-configuration-openvpn)
+ ('client openvpn-client-configuration-openvpn))
config))
(log-file (match role
- ('server "/var/log/openvpn-server.log")
- ('client "/var/log/openvpn-client.log"))))
+ ('server "/var/log/openvpn-server.log")
+ ('client "/var/log/openvpn-client.log"))))
(list (shepherd-service
(documentation (string-append "Run the OpenVPN "
(match role
- ('server "server")
- ('client "client"))
+ ('server "server")
+ ('client "client"))
" daemon."))
(provision (match role
- ('server '(vpn-server))
- ('client '(vpn-client))))
+ ('server '(vpn-server))
+ ('client '(vpn-client))))
(requirement '(networking))
(start #~(make-forkexec-constructor
(list (string-append #$openvpn "/sbin/openvpn")