aboutsummaryrefslogtreecommitdiffstats
path: root/www-servers/caddy/files
diff options
context:
space:
mode:
authorWynn Wolf Arbor2020-10-30 18:39:11 +0100
committerWynn Wolf Arbor2020-10-30 18:39:11 +0100
commitc024e8614e9363abc2add8f5729733a1779c4ec6 (patch)
tree5255c52d0ae38dce33ee4e976e8c2784ef28bfb6 /www-servers/caddy/files
parent16e48ffe86e58d4480cc1be064792d89284bba3f (diff)
downloadpramantha-c024e8614e9363abc2add8f5729733a1779c4ec6.tar.gz
www-servers/caddy: Add 2.2.1
Package-Manager: Portage-3.0.8, Repoman-3.0.2
Diffstat (limited to 'www-servers/caddy/files')
-rw-r--r--www-servers/caddy/files/caddy.initd22
1 files changed, 22 insertions, 0 deletions
diff --git a/www-servers/caddy/files/caddy.initd b/www-servers/caddy/files/caddy.initd
new file mode 100644
index 0000000..a9cf7ea
--- /dev/null
+++ b/www-servers/caddy/files/caddy.initd
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+name="${RC_SVCNAME}"
+
+config="${CADDY_CONFIG:-/etc/caddy/Caddyfile}"
+pidfile="/run/${RC_SVCNAME}/caddy.pid"
+
+command="caddy"
+command_args="run --config ${config} --pidfile ${pidfile}"
+command_user="caddy:http"
+command_background=yes
+
+depend() {
+ use net
+ after dns
+}
+
+start_pre() {
+ checkpath -q -d -o "${command_user}" "/run/${RC_SVCNAME}"
+}