feat: add a script for restarting the docservice - #14
Conversation
|
Two notes from reviewing this together with Euro-Office/server#41 (details in the review addendum there): 1. The script can no-op and still exit 0. if pgrep -x "systemd" > /dev/null; then
systemctl restart ds-docservice ds-converter
elif pgrep -x "supervisord" > /dev/null; then
supervisorctl restart docservice converter
else
echo "documentserver-restart.sh: no supported init found (systemd/supervisord)" >&2
exit 1
fi2. What's right, for the record: the bare One packaging nit: the deb Ordering: this must merge and ship in a rebuilt package/image before server#41, or its regenerate endpoint fails half-applied (fonts regenerated on disk, services and browser caches stale). |
b6ed1c5 to
f8f5a65
Compare
|
TL;DR: No privilege-escalation issue — script takes no args, no env/config injection surface, correct perms, no TOCTOU. The prior review comment (silent exit-0 on unrecognized init system) is genuinely fixed. Two packaging gaps worth closing before merge:
Detail1. server#41's Suggested fix: 2. Sudoers entry permits arbitrary arguments ( The entry for Suggested fix: (Non-blocking, for awareness: orchestrated/k8s deployments have no supervisor at all, so this script correctly — and loudly — fails there; the font-regen feature is simply unavailable on that deployment target for now.) |
needed for loading new fonts Signed-off-by: dsyzov <dmytro.syzov@nextcloud.com>
f8f5a65 to
27c599b
Compare
|
TL;DR: The sudoers arg-lock is fixed, exactly as suggested. The DetailFixed — confirmed:
Still open:
New, same gap on the other packaging format: Neither |
The sudo dependency is intentional. Minimal installation users often do not want to add it. |
|
Agreed on Correction to my earlier comment: the failure isn't actually opaque. |
moodyjmz
left a comment
There was a problem hiding this comment.
Sudoers arg-lock fixed, silent exit-0 fixed, sudo Depends/Recommends settled (Recommends is correct — apt installs it by default, the Docker image installs sudo explicitly). No open issues from my side. Approving.
needed for loading new fonts
Assisted-by: Claude Code (Opus-4.8)