Subject: [PATCH v4] community/caddy: upgrade v2.1.1

From: Alex McGrath <[email-masked]>
Date: Sat, 11 Jul 2020 19:02:08 +0100

From: Linux User <[email-masked]>

---
 community/caddy/APKBUILD    | 12 ++++++------
 community/caddy/caddy.confd |  3 ++-
 community/caddy/caddy.initd |  2 +-
 3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/community/caddy/APKBUILD b/community/caddy/APKBUILD
index 6b7b028ce8..e03c05e504 100644
--- a/community/caddy/APKBUILD
+++ b/community/caddy/APKBUILD
@@ -1,8 +1,8 @@
 # Contributor: Carlo Landmeter <[email-masked]>
 # Maintainer: Chloe Kudryavtsev <[email-masked]>
 pkgname=caddy
-pkgver=1.0.4
-pkgrel=3
+pkgver=2.1.1
+pkgrel=0
 pkgdesc="Fast, cross-platform HTTP/2 web server with automatic HTTPS"
 url="https://caddyserver.com/"
 arch="all !s390x"
@@ -37,7 +37,7 @@ prepare() {
 build() {
 	GO111MODULE=on go build -v -o bin/caddy -ldflags \
 		"-X github.com/mholt/caddy/caddy/caddymain.gitTag=$pkgver" \
-		./caddy
+		./cmd/caddy
 }
 
 check() {
@@ -71,7 +71,7 @@ cleanup_srcdir() {
 	default_cleanup_srcdir
 }
 
-sha512sums="49dae9c0965000ba1cf36a6148ff78718383a511d671fb73edc3b08e4219db0a9902fc70e40bcbb13ffa7afaa520fd1e6303ea3776059de04085896c018d9c02  caddy-1.0.4.tar.gz
-1fbab66fbc913f194a94eee6e60e218fcc762b9467258ff22eed43dc98664692f2f2525226068fe3ca101cfe5b6727f16774c2a49c575abb83782416680f399a  caddy.initd
-7808688e92ab9950403a9b8ad29777f5bd0f75aa8cccc1d49958bb1e5af1b972dfba0c6d31931354f702a3a13933d0a1b8f28b82eed263773d71b79ec95cc15c  caddy.confd
+sha512sums="4359935f4267ada37e0ab2f3c3daeb30cb1853b03a11f988e0f25716ba385d90237d76334b66a66f914bc21b3b36bbc5112e572f17a9453a865c088013ad4ca6  caddy-2.1.1.tar.gz
+de935e14d64d718418a5d166c93021120f6cd6c230170cfb3272fd9693a08e50df46f41af6cc5adde678ab8c3aba69c189864f18e9b5fb40af12e0f8e99b507c  caddy.initd
+d7c1a3b470f69080204f7d75ba130a1f4376dd5e36605349208a2b54e644f46dfc1ce7ee99ea915d438b7aec551c2d46932502ec0ba5b739370fbd8befadfe04  caddy.confd
 c24805d17234e6cf40fe1dd102c03f05cf6129d43f58f5567d540a0e4400ce89994820bb0e317f611c65459ae26bcf7110e23a8fecaae11ca78a561892b45d75  caddy.conf"
diff --git a/community/caddy/caddy.confd b/community/caddy/caddy.confd
index 1c17719c61..09117d01bf 100644
--- a/community/caddy/caddy.confd
+++ b/community/caddy/caddy.confd
@@ -1,2 +1,3 @@
 # caddy options file
-CADDY_OPTS="-conf /etc/caddy/caddy.conf -agree"
+CADDY_CONFIG="/etc/caddy/caddy.conf"
+CADDY_OPTS="run -adapter caddyfile -config $CADDY_CONFIG" 
diff --git a/community/caddy/caddy.initd b/community/caddy/caddy.initd
index 8e4dae22da..182ae8dc9a 100644
--- a/community/caddy/caddy.initd
+++ b/community/caddy/caddy.initd
@@ -15,7 +15,7 @@ depend() {
 
 checkconfig() {
 	ebegin "Checking configuration for $RC_SVCNAME"
-	su -s /bin/sh ${command_user%:*} -c "$command $command_args -validate"
+	su -s /bin/sh ${command_user%:*} -c "$command validate -config $CADDY_CONFIG -adapter caddyfile"
 	eend $?
 }
 
-- 
2.27.0