* [PATCH 0/2] examples updates
@ 2023-10-28 18:01 Eric Wong
2023-10-28 18:01 ` [PATCH 1/2] examples/*.service: avoid `nobody' user on systemd Eric Wong
2023-10-28 18:01 ` [PATCH 2/2] examples/logrotate: only SIGUSR1 main process Eric Wong
0 siblings, 2 replies; 3+ messages in thread
From: Eric Wong @ 2023-10-28 18:01 UTC (permalink / raw)
To: meta
I really don't check my own syslogs enough :x
Eric Wong (2):
examples/*.service: avoid `nobody' user on systemd
examples/logrotate: only SIGUSR1 main process
examples/logrotate.conf | 4 ++--
examples/public-inbox-httpd@.service | 4 ++--
examples/public-inbox-imapd@.service | 2 +-
examples/public-inbox-nntpd@.service | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] examples/*.service: avoid `nobody' user on systemd
2023-10-28 18:01 [PATCH 0/2] examples updates Eric Wong
@ 2023-10-28 18:01 ` Eric Wong
2023-10-28 18:01 ` [PATCH 2/2] examples/logrotate: only SIGUSR1 main process Eric Wong
1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2023-10-28 18:01 UTC (permalink / raw)
To: meta
systemd complains about `User=nobody' since `nobody' has access
to all files which can't be mapped to a valid UID. We'll also
switch to `Group=ssl-cert' since that ought to be able to read
TLS certificates.
---
examples/public-inbox-httpd@.service | 4 ++--
examples/public-inbox-imapd@.service | 2 +-
examples/public-inbox-nntpd@.service | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/examples/public-inbox-httpd@.service b/examples/public-inbox-httpd@.service
index a56f6f81..11859198 100644
--- a/examples/public-inbox-httpd@.service
+++ b/examples/public-inbox-httpd@.service
@@ -32,8 +32,8 @@ NonBlocking = true
Sockets = public-inbox-httpd.socket
KillSignal = SIGQUIT
-User = nobody
-Group = nogroup
+User = news
+Group = ssl-cert
ExecReload = /bin/kill -HUP $MAINPID
TimeoutStopSec = 86400
KillMode = process
diff --git a/examples/public-inbox-imapd@.service b/examples/public-inbox-imapd@.service
index 8f5b79f2..80104605 100644
--- a/examples/public-inbox-imapd@.service
+++ b/examples/public-inbox-imapd@.service
@@ -32,7 +32,7 @@ NonBlocking = true
Sockets = public-inbox-imapd.socket
KillSignal = SIGQUIT
-User = nobody
+User = news
Group = ssl-cert
ExecReload = /bin/kill -HUP $MAINPID
TimeoutStopSec = 86400
diff --git a/examples/public-inbox-nntpd@.service b/examples/public-inbox-nntpd@.service
index 11bc223f..24f9ca73 100644
--- a/examples/public-inbox-nntpd@.service
+++ b/examples/public-inbox-nntpd@.service
@@ -32,7 +32,7 @@ NonBlocking = true
Sockets = public-inbox-nntpd.socket
KillSignal = SIGQUIT
-User = nobody
+User = news
Group = ssl-cert
ExecReload = /bin/kill -HUP $MAINPID
TimeoutStopSec = 86400
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] examples/logrotate: only SIGUSR1 main process
2023-10-28 18:01 [PATCH 0/2] examples updates Eric Wong
2023-10-28 18:01 ` [PATCH 1/2] examples/*.service: avoid `nobody' user on systemd Eric Wong
@ 2023-10-28 18:01 ` Eric Wong
1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2023-10-28 18:01 UTC (permalink / raw)
To: meta
There's no need to send SIGUSR1 to auxiliary processes since
they don't know what to do with them.
---
examples/logrotate.conf | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/examples/logrotate.conf b/examples/logrotate.conf
index 4ce08843..fad40cfc 100644
--- a/examples/logrotate.conf
+++ b/examples/logrotate.conf
@@ -18,7 +18,7 @@
# systemd users do not need PID files,
# only signal the @1 process since the @2 is short-lived
# For systemd users, assuming you use two services
- systemctl kill -s SIGUSR1 public-inbox-httpd@1.service
- systemctl kill -s SIGUSR1 public-inbox-nntpd@1.service
+ systemctl kill -s SIGUSR1 --kill-who=main \
+ public-inbox-netd@1.service
endscript
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-28 18:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-28 18:01 [PATCH 0/2] examples updates Eric Wong
2023-10-28 18:01 ` [PATCH 1/2] examples/*.service: avoid `nobody' user on systemd Eric Wong
2023-10-28 18:01 ` [PATCH 2/2] examples/logrotate: only SIGUSR1 main process Eric Wong
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).