This references https://packages.gentoo.org/packages/www-servers/caddy Thanks for bringing the caddy onboard. It's missing the init script.
user www-data referenced in the standard init script is not added to /etc/passwd
I made one for my overlay, feel free to copy and/or adapt. Or if the maintainer wish, I can do a PR later. --> https://github.com/csmk/frabjous/tree/master/www-servers/caddy/files Cheers!
Created attachment 514228 [details] sample caddy init script Uses a few vars that should be defined in /etc/conf.d/caddy (all vars prefixed with caddy_).
I had a heck of a time getting caddy working from portage. I wrote my own init script before noticing this ticket & Ian's overlay. I've attached my init script for comparison, however it is very rough around the edges - it's my first openrc script. I have some other thoughts - should /usr/bin/caddy have capability cap_net_bind_service and run as www-data? Alternatively, a Caddyfile could be included that drops privileges for you.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ecb2ed95885b68fb63650e7c7b53f26b716bf52b commit ecb2ed95885b68fb63650e7c7b53f26b716bf52b Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2021-04-04 11:44:37 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2021-04-04 14:28:06 +0000 www-servers/caddy: Revump to 2.3.0-r1 for init script and fcaps Closes: https://bugs.gentoo.org/612876 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Zac Medico <zmedico@gentoo.org> www-servers/caddy/caddy-2.3.0-r1.ebuild | 1164 +++++++++++++++++++++++++++++ www-servers/caddy/files/caddy.service | 17 + www-servers/caddy/files/caddy_config.json | 31 + www-servers/caddy/files/confd | 2 + www-servers/caddy/files/initd | 26 + www-servers/caddy/files/logrotated | 3 + 6 files changed, 1243 insertions(+)
We didn't have a www-data user yet. I copied the idea for the "http" user that I found here: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=nginx-custom