* [bug#53441] [PATCH] Add service examples to the GNU Shepherd manual
@ 2022-01-22 10:24 AwesomeAdam54321
0 siblings, 0 replies; only message in thread
From: AwesomeAdam54321 @ 2022-01-22 10:24 UTC (permalink / raw)
To: 53441; +Cc: AwesomeAdam54321
---
doc/shepherd.texi | 62 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)
diff --git a/doc/shepherd.texi b/doc/shepherd.texi
index 94f6131..618d852 100644
--- a/doc/shepherd.texi
+++ b/doc/shepherd.texi
@@ -1033,6 +1033,68 @@ also specifies some more initial values for the slots:
(restart (...)))))
@end lisp
+Here are some more examples:
+
+@lisp
+(register-services
+ (make <service>
+ #:provides '(cups)
+ #:requires '()
+ #:docstring "The cups service provides the CUPS scheduler."
+ #:start (make-forkexec-constructor '("cupsd" "-f"))
+ #:stop (make-kill-destructor)
+ #:respawn? #t)
+
+ (make <service>
+ #:provides '(cups-browsed)
+ #:requires '(cups)
+ #:docstring "The cups-browsed service makes remote CUPS printers available locally."
+ #:start (make-forkexec-constructor '("cups-browsed"))
+ #:stop (make-kill-destructor)
+ #:respawn? #t)
+
+ (make <service>
+ #:provides '(cron)
+ #:requires '()
+ #:docstring "The cron service provides execution of regularly scheduled commands."
+ #:start (make-forkexec-constructor '("cron" "-f"))
+ #:stop (make-kill-destructor)
+ #:respawn? #t)
+
+ (make <service>
+ #:provides '(guix-daemon)
+ #:requires '()
+ #:docstring "The guix-daemon service accesses the store, and builds derivations on behalf of its clients."
+ #:start (make-forkexec-constructor '("env" "GUIX_LOCPATH=/var/guix/profiles/per-user/root/guix-profile/lib/locale" "LC_ALL=en_US.utf8" "/var/guix/profiles/per-user/root/current-guix/bin/guix-daemon" "--build-users-group=guixbuild"))
+ #:stop (make-kill-destructor)
+ #:respawn? #t)
+
+ (make <service>
+ #:provides '(binfmt-support)
+ #:requires '()
+ #:docstring "Enables support for additional executable binary formats."
+ #:start (make-forkexec-constructor '("update-binfmts" "--enable"))
+ #:stop (make-system-destructor "update-binfmts --disable")
+ #:oneshot? #t)
+
+ (make <service>
+ #:provides '(lm-sensors)
+ #:requires '()
+ #:docstring "Initialize hardware monitoring sensors."
+ #:start (make-system-constructor "sensors -s ; sensors")
+ #:stop (make-system-destructor)
+ #:oneshot? #t)
+
+ (make <service>
+ #:provides '(pulseaudio)
+ #:requires '()
+ #:docstring "The pulseaudio service provides the PulseAudio Sound Server."
+ #:start (make-forkexec-constructor '("pulseaudio" "--daemonize=no" "--log-target=stderr") #:user "user" #:group "audio" #:environment-variables '("HOME=/home/user"))
+ #:stop (make-kill-destructor)
+ #:respawn? #t))
+
+@end lisp
+
@node Managing User Services
@section Managing User Services
--
2.34.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-01-22 13:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-22 10:24 [bug#53441] [PATCH] Add service examples to the GNU Shepherd manual AwesomeAdam54321
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).