Browse Source

Document socket activation.

Blallo 5 years ago
parent
commit
f7caefdae1
2 changed files with 24 additions and 1 deletions
  1. 23 1
      docs/docs/systemd.md
  2. 1 0
      docs/mkdocs.yml

+ 23 - 1
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`.

+ 1 - 0
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'