summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-auth/docker_auth/files/docker_auth.initd')
-rw-r--r--sys-auth/docker_auth/files/docker_auth.initd25
1 files changed, 25 insertions, 0 deletions
diff --git a/sys-auth/docker_auth/files/docker_auth.initd b/sys-auth/docker_auth/files/docker_auth.initd
new file mode 100644
index 000000000000..c6fecffe7efc
--- /dev/null
+++ b/sys-auth/docker_auth/files/docker_auth.initd
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="Docker Registry Authentication Server"
+pidfile=${pidfile:-"/run/${SVCNAME}/${SVCNAME}.pid"}
+user=${user:-${SVCNAME}}
+group=${group:-${SVCNAME}}
+
+command="/usr/bin/auth_server"
+command_args="${command_args:--log_dir /var/log/${SVCNAME} /etc/docker_auth/config.yml}"
+command_background="true"
+start_stop_daemon_args="--user ${user} --group ${group} \
+ --stdout /var/log/${SVCNAME}/${SVCNAME}.log \
+ --stderr /var/log/${SVCNAME}/${SVCNAME}.log"
+
+depend() {
+ need net
+ after net
+}
+
+start_pre() {
+ checkpath -d -m 0755 -o "${user}":"${group}" "${pidfile%/*}"
+}