summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-cluster/kube-proxy/files/kube-proxy.initd')
-rw-r--r--sys-cluster/kube-proxy/files/kube-proxy.initd24
1 files changed, 24 insertions, 0 deletions
diff --git a/sys-cluster/kube-proxy/files/kube-proxy.initd b/sys-cluster/kube-proxy/files/kube-proxy.initd
new file mode 100644
index 000000000000..0c410f4a4a3d
--- /dev/null
+++ b/sys-cluster/kube-proxy/files/kube-proxy.initd
@@ -0,0 +1,24 @@
+#!/sbin/openrc-run
+# Copyright 2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="Kubernetes Proxy service"
+pidfile=${pidfile:-"/run/${SVCNAME}/${SVCNAME}.pid"}
+user=${user:-root}
+group=${group:-root}
+
+command="/usr/bin/kube-proxy"
+command_args="${command_args}"
+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%/*}"
+}