aboutsummaryrefslogtreecommitdiffstats
path: root/community/docker/docker.initd
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2020-02-22 20:01:14 -0300
committerLeo <thinkabit.ukim@gmail.com>2020-02-25 22:09:49 -0300
commit24924763d56dd80da5430746a238868ab6cc20d5 (patch)
treef285d68a2ff515397283432d0ba5fb4306c9741a /community/docker/docker.initd
parent4763e20f8ca52d617411acba3fd766528cd03aad (diff)
downloadaports-24924763d56dd80da5430746a238868ab6cc20d5.tar.gz
aports-24924763d56dd80da5430746a238868ab6cc20d5.tar.bz2
aports-24924763d56dd80da5430746a238868ab6cc20d5.tar.xz
community/docker: transition to supervise-daemon
Diffstat (limited to 'community/docker/docker.initd')
-rw-r--r--community/docker/docker.initd29
1 files changed, 29 insertions, 0 deletions
diff --git a/community/docker/docker.initd b/community/docker/docker.initd
new file mode 100644
index 0000000000..5a56d983a4
--- /dev/null
+++ b/community/docker/docker.initd
@@ -0,0 +1,29 @@
+#!/sbin/openrc-run
+supervisor=supervise-daemon
+
+name="Docker Daemon"
+description="Persistent process that manages docker containers"
+description_reload="Reload configuration without exiting"
+
+command="${DOCKERD_BINARY:-/usr/bin/dockerd}"
+command_args="${DOCKER_OPTS}"
+DOCKER_LOGFILE="${DOCKER_LOGFILE:-/var/log/${RC_SVCNAME}.log}"
+DOCKER_ERRFILE="${DOCKER_ERRFILE:-${DOCKER_LOGFILE}}"
+DOCKER_OUTFILE="${DOCKER_OUTFILE:-${DOCKER_LOGFILE}}"
+supervise_daemon_args="--stderr \"${DOCKER_ERRFILE}\" --stdout \"${DOCKER_OUTFILE}\""
+
+extra_started_commands="reload"
+
+rc_ulimit="${DOCKER_ULIMIT:--c unlimited -n 1048576 -u unlimited}"
+
+retry="${DOCKER_RETRY:-TERM/60/KILL/10}"
+
+start_pre() {
+ checkpath -f -m 0644 -o root:docker "$DOCKER_LOGFILE"
+}
+
+reload() {
+ ebegin "Reloading configuration"
+ $supervisor $RC_SVCNAME --signal HUP
+ eend $?
+}