From f7caefdae13705a90eedbe3eb72be5406bb0fc68 Mon Sep 17 00:00:00 2001 From: Blallo Date: Fri, 3 May 2019 14:26:16 +0200 Subject: [PATCH] Document socket activation. --- docs/docs/systemd.md | 24 +++++++++++++++++++++++- docs/mkdocs.yml | 1 + 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/docs/docs/systemd.md b/docs/docs/systemd.md index eac05ef..8864f5e 100644 --- a/docs/docs/systemd.md +++ b/docs/docs/systemd.md @@ -69,4 +69,26 @@ Here is a working unit for this: ### journald with socket activation To run circologd as non-root, while listening on a root-owned socket (`/run/systemd/journal/syslog`) use -socket activation +socket activation. Create a unit in `/etc/systemd/system/circolog.service`: + + [Unit] + Description=In-memory logging + + [Service] + User=nobody + Group=nogroup + ExecStart=/usr/local/sbin/circologd -syslogd-socket "" -buffer-size 2000 -query-socket /run/circolog/query.sock + + [Install] + WantedBy=multi-user.target + +Then symlink the `syslog.service` unit to the newly created one: + + ln -sf /etc/systemd/system/circolog.service /etc/systemd/system/syslog.service + +and restart the service: + + systemctl daemon-reload + systemctl restart syslog.service + +Now circolog is activated and receives messages from `journald`. diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index a60680b..0b4bb34 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -4,5 +4,6 @@ nav: - Install: install.md - Queries: query.md - Hacking: hacking.md + - Systemd: systemd.md repo_url: https://git.lattuga.net/boyska/circolog repo_name: 'Repository'