caddy: add runit service

This commit is contained in:
lemmi 2017-09-13 23:21:01 +02:00
parent 389be31312
commit 8c7ae38050
3 changed files with 20 additions and 1 deletions

View File

@ -1,5 +1,6 @@
case "${ACTION}" in
post)
setcap CAP_NET_BIND_SERVICE=+ep usr/bin/caddy
chown -R caddy:caddy /etc/caddy
;;
esac

11
srcpkgs/caddy/files/caddy/run Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
CADDYPATH="/var/lib/caddy"
export CADDYPATH
mkdir -p "$CADDYPATH"
chmod 0700 "$CADDYPATH"
chown caddy:caddy "$CADDYPATH"
cd /etc/caddy
exec chpst -o 8192 -u caddy caddy

View File

@ -1,7 +1,7 @@
# Template file for 'caddy'
pkgname=caddy
version=0.10.8
revision=1
revision=2
build_style=go
go_import_path="github.com/mholt/caddy"
go_package="${go_import_path}/caddy"
@ -12,3 +12,10 @@ license="Apache-2.0"
homepage="https://caddyserver.com"
distfiles="https://github.com/mholt/caddy/archive/v${version}.tar.gz"
checksum=3328efc8b64a428d49dd27edf44c0b1d9dfdc8879366663ce002bafc3a7b2b90
system_accounts="caddy"
make_dirs="/etc/caddy 0700 caddy caddy"
post_install() {
vsv caddy
}