services: avahi: Use socket activation and log to stderr.
* gnu/services/avahi.scm (avahi-shepherd-service): Change to systemd style. Remove ‘--daemonize’ option and #:pid-file. Add #:lazy-start? and #:log-file. Change-Id: I1915243f057ff3bbe281f46f17826f24b124f659
This commit is contained in:
parent
b9b0f0a995
commit
3298ec0200
@ -1,5 +1,5 @@
|
|||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2014-2020, 2022 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2014-2020, 2022, 2024 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
@ -131,13 +131,17 @@
|
|||||||
(provision '(avahi-daemon))
|
(provision '(avahi-daemon))
|
||||||
(requirement '(user-processes dbus-system networking))
|
(requirement '(user-processes dbus-system networking))
|
||||||
|
|
||||||
(start #~(make-forkexec-constructor
|
(start #~(make-systemd-constructor
|
||||||
(list #$(file-append avahi "/sbin/avahi-daemon")
|
(list #$(file-append avahi "/sbin/avahi-daemon")
|
||||||
"--daemonize"
|
|
||||||
#$@(if debug? #~("--debug") #~())
|
#$@(if debug? #~("--debug") #~())
|
||||||
"-f" #$config)
|
"-f" #$config)
|
||||||
#:pid-file "/run/avahi-daemon/pid"))
|
(list (endpoint
|
||||||
(stop #~(make-kill-destructor))
|
(make-socket-address
|
||||||
|
AF_UNIX
|
||||||
|
"/run/avahi-daemon/socket")))
|
||||||
|
#:lazy-start? #f
|
||||||
|
#:log-file "/var/log/avahi-daemon.log"))
|
||||||
|
(stop #~(make-systemd-destructor))
|
||||||
(actions (list (shepherd-configuration-action config)))))))
|
(actions (list (shepherd-configuration-action config)))))))
|
||||||
|
|
||||||
(define avahi-service-type
|
(define avahi-service-type
|
||||||
|
Loading…
Reference in New Issue
Block a user