Subject: [PATCH] community/caddy: add more conf options

From: Galen Abell <[email-masked]>
Date: Sat, 7 Dec 2019 22:09:21 +0100

---
 community/caddy/APKBUILD    | 6 +++---
 community/caddy/caddy.confd | 9 +++++++++
 community/caddy/caddy.initd | 4 +++-
 3 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/community/caddy/APKBUILD b/community/caddy/APKBUILD
index 96e746e2f3..d992175ca5 100644
--- a/community/caddy/APKBUILD
+++ b/community/caddy/APKBUILD
@@ -2,7 +2,7 @@
 # Maintainer: Chloe Kudryavtsev <[email-masked]>
 pkgname=caddy
 pkgver=1.0.4
-pkgrel=0
+pkgrel=1
 pkgdesc="Fast, cross-platform HTTP/2 web server with automatic HTTPS"
 url="https://caddyserver.com/"
 arch="all !s390x"
@@ -72,6 +72,6 @@ cleanup_srcdir() {
 }
 
 sha512sums="49dae9c0965000ba1cf36a6148ff78718383a511d671fb73edc3b08e4219db0a9902fc70e40bcbb13ffa7afaa520fd1e6303ea3776059de04085896c018d9c02  caddy-1.0.4.tar.gz
-191b57cee5ebf8cad87bfaefdafc55008ae947f366f7288c4ae712bd026899ed8014949ae3f2860d2e6dc85781ca95b0e7c5fb2c02e67b9b4619abfe87bda55e  caddy.initd
-7808688e92ab9950403a9b8ad29777f5bd0f75aa8cccc1d49958bb1e5af1b972dfba0c6d31931354f702a3a13933d0a1b8f28b82eed263773d71b79ec95cc15c  caddy.confd
+8073ccca85f608bb3c694cff6715ba464e7454c29e24c5628600ae2816e5418a9475278df316b13efc1c834cee3c452eb29c05ef0591c85e9463380fba7e1c6a  caddy.initd
+dc9cb91c098c5f3902e68036f9a891ffe91b9a444394a8e77e4697c4e538e4fd6abbc73b99c359b4aa9b0f521f1e30ca308ec77a5499276b511e5ae80db76993  caddy.confd
 c24805d17234e6cf40fe1dd102c03f05cf6129d43f58f5567d540a0e4400ce89994820bb0e317f611c65459ae26bcf7110e23a8fecaae11ca78a561892b45d75  caddy.conf"
diff --git a/community/caddy/caddy.confd b/community/caddy/caddy.confd
index 1c17719c61..85e8c249ce 100644
--- a/community/caddy/caddy.confd
+++ b/community/caddy/caddy.confd
@@ -1,2 +1,11 @@
+# location to store assets
+CADDYPATH="$HOME/.caddy"
+
+# user
+CADDY_USER="caddy"
+
+# group
+CADDY_GROUP="caddy"
+
 # caddy options file
 CADDY_OPTS="-conf /etc/caddy/caddy.conf -agree"
diff --git a/community/caddy/caddy.initd b/community/caddy/caddy.initd
index 22d9fab90a..90718621f5 100644
--- a/community/caddy/caddy.initd
+++ b/community/caddy/caddy.initd
@@ -1,11 +1,13 @@
 #!/sbin/openrc-run
 
+export CADDYPATH="${CADDYPATH:-$HOME/.caddy}"
+
 name="Caddy webserver"
 command="/usr/sbin/caddy"
 command_args="$CADDY_OPTS"
 pidfile="/var/run/caddy.pid"
 command_background=yes
-command_user=caddy:caddy
+command_user="${CADDY_USER:-caddy}:${CADDY_GROUP:-caddy}"
 extra_commands="checkconfig"
 extra_started_commands="reload"
 
-- 
2.24.0