mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
services: web: Add go-webdav.
* gnu/services/web.scm (go-webdav-service-type): New service. (go-webdav-account-service): New variable. (go-webdav-shepherd-service): New procedures. * gnu/tests/web.scm (%test-go-webdav): Add tests for the service. * doc/guix.texi (Web Services): Document it. Signed-off-by: Danny Milosavljevic <dannym@friendly-machines.com>
This commit is contained in:
committed by
Danny Milosavljevic
parent
daca67c560
commit
64622248cd
@@ -57,6 +57,7 @@
|
||||
#:use-module (gnu packages python-web)
|
||||
#:use-module (gnu packages rsync)
|
||||
#:use-module (gnu packages gnupg)
|
||||
#:use-module (gnu packages golang-xyz)
|
||||
#:use-module (gnu packages guile)
|
||||
#:use-module (gnu packages logging)
|
||||
#:use-module (gnu packages mail)
|
||||
@@ -255,6 +256,8 @@
|
||||
whoogle-configuration-port
|
||||
whoogle-configuration-environment-variables
|
||||
|
||||
go-webdav-service-type
|
||||
|
||||
patchwork-database-configuration
|
||||
patchwork-database-configuration?
|
||||
patchwork-database-configuration-engine
|
||||
@@ -1634,6 +1637,44 @@ Whoogle."))
|
||||
(default-value (whoogle-configuration))
|
||||
(description "Set up the @code{whoogle-search} metasearch engine.")))
|
||||
|
||||
|
||||
;;;
|
||||
;;; go-webdav
|
||||
;;;
|
||||
|
||||
(define (go-webdav-shepherd-service args)
|
||||
(list (shepherd-service
|
||||
(documentation "go-webdav daemon.")
|
||||
(provision '(go-webdav))
|
||||
;; go-webdav may be bound to a particular IP address, hence
|
||||
;; only start it after the networking service has started.
|
||||
(requirement '(user-processes networking))
|
||||
(start #~(make-forkexec-constructor
|
||||
(list (string-append #$go-webdav "/bin/webdav-server")
|
||||
#$@args)))
|
||||
(stop #~(make-kill-destructor)))))
|
||||
|
||||
(define go-webdav-account-service
|
||||
(list (user-group (name "go-webdav") (system? #t))
|
||||
(user-account
|
||||
(name "go-webdav")
|
||||
(group "go-webdav")
|
||||
(system? #t)
|
||||
(comment "go-webdav daemon user")
|
||||
(home-directory "/var/empty")
|
||||
(shell (file-append shadow "/sbin/nologin")))))
|
||||
|
||||
(define-public go-webdav-service-type
|
||||
(service-type (name 'go-webdav)
|
||||
(description "Run the go-webdav WebDAV server.")
|
||||
(extensions
|
||||
(list (service-extension account-service-type
|
||||
(const go-webdav-account-service))
|
||||
(service-extension shepherd-root-service-type
|
||||
go-webdav-shepherd-service)))
|
||||
(compose concatenate)
|
||||
(default-value '("-addr" "127.0.0.1:8080"))))
|
||||
|
||||
|
||||
;;;
|
||||
;;; Patchwork
|
||||
|
||||
Reference in New Issue
Block a user