diff options
author | David P <megver83@parabola.nu> | 2022-07-17 19:10:38 -0400 |
---|---|---|
committer | David P <megver83@parabola.nu> | 2022-07-17 19:10:38 -0400 |
commit | a540c3434c185b7e4ffe8395884892c3e75173bb (patch) | |
tree | bc3d0fcb6b6a435fcc4bec61311569177d4d010e /nonsystemd/docker-openrc | |
parent | 556a026f6677f85ba3a50a57d12220bfb342a85c (diff) | |
download | abslibre-a540c3434c185b7e4ffe8395884892c3e75173bb.tar.gz abslibre-a540c3434c185b7e4ffe8395884892c3e75173bb.tar.bz2 abslibre-a540c3434c185b7e4ffe8395884892c3e75173bb.zip |
addpkg: nonsystemd/docker-openrc 20210505-1
Signed-off-by: David P <megver83@parabola.nu>
Diffstat (limited to 'nonsystemd/docker-openrc')
-rw-r--r-- | nonsystemd/docker-openrc/PKGBUILD | 25 | ||||
-rw-r--r-- | nonsystemd/docker-openrc/docker.confd | 29 | ||||
-rw-r--r-- | nonsystemd/docker-openrc/docker.initd | 28 |
3 files changed, 82 insertions, 0 deletions
diff --git a/nonsystemd/docker-openrc/PKGBUILD b/nonsystemd/docker-openrc/PKGBUILD new file mode 100644 index 000000000..49964523f --- /dev/null +++ b/nonsystemd/docker-openrc/PKGBUILD @@ -0,0 +1,25 @@ +# Maintainer: Rafli Akmal <rafliakmaltejakusuma@gmail.com> +# Contributor: artoo <artoo@artixlinux.org> +# Contributor: Oscar Campos <damnwidget@artixlinux.org> + +pkgname=docker-openrc +pkgver=20210505 +pkgrel=1 +pkgdesc="OpenRC docker init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +groups=('openrc-galaxy') +depends=('openrc' 'docker') +provides=('init-docker') +conflicts=('init-docker') +backup=('etc/conf.d/docker') +source=("docker.confd" + "docker.initd") +sha256sums=('3f661c0032dda93d448f138308b1d70b35ef9297bc43816891bbcd1ab5d7cc5e' + 'd891f5ba66b5a8dd472b7b19db774af7a22a7a1c0766cb57c3422c098a82c493') + +package() { + install -Dm755 "$srcdir/docker.initd" "$pkgdir/etc/init.d/docker" + install -Dm644 "$srcdir/docker.confd" "$pkgdir/etc/conf.d/docker" +} diff --git a/nonsystemd/docker-openrc/docker.confd b/nonsystemd/docker-openrc/docker.confd new file mode 100644 index 000000000..cc599e6da --- /dev/null +++ b/nonsystemd/docker-openrc/docker.confd @@ -0,0 +1,29 @@ +# /etc/conf.d/docker: config file for /etc/init.d/docker + +# where the docker daemon output gets piped +# this contains both stdout and stderr. If you need to separate them, +# see the settings below +#DOCKER_LOGFILE="/var/log/docker.log" + +# where the docker daemon stdout gets piped +# if this is not set, DOCKER_LOGFILE is used +#DOCKER_OUTFILE="/var/log/docker-out.log" + +# where the docker daemon stderr gets piped +# if this is not set, DOCKER_LOGFILE is used +#DOCKER_ERRFILE="/var/log/docker-err.log" + +# where docker's pid get stored +#DOCKER_PIDFILE="/run/docker.pid" + +# Settings for process limits (ulimit) +#DOCKER_ULIMIT="-c unlimited -n 1048576 -u unlimited" + +# seconds to wait for sending SIGTERM and SIGKILL signals when stopping docker +#DOCKER_RETRY="TERM/60/KILL/10" + +# where the docker daemon itself is run from +#DOCKERD_BINARY="/usr/bin/dockerd" + +# any other random options you want to pass to docker +DOCKER_OPTS="" diff --git a/nonsystemd/docker-openrc/docker.initd b/nonsystemd/docker-openrc/docker.initd new file mode 100644 index 000000000..738747dbd --- /dev/null +++ b/nonsystemd/docker-openrc/docker.initd @@ -0,0 +1,28 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command="${DOCKERD_BINARY:-/usr/bin/dockerd}" +pidfile="${DOCKER_PIDFILE:-/run/${RC_SVCNAME}.pid}" +command_args="-p \"${pidfile}\" ${DOCKER_OPTS}" +DOCKER_LOGFILE="${DOCKER_LOGFILE:-/var/log/${RC_SVCNAME}.log}" +DOCKER_ERRFILE="${DOCKER_ERRFILE:-${DOCKER_LOGFILE}}" +DOCKER_OUTFILE="${DOCKER_OUTFILE:-${DOCKER_LOGFILE}}" +start_stop_daemon_args="--background \ + --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 ${RC_SVCNAME}" + start-stop-daemon --signal HUP --pidfile "${pidfile}" + eend $? "Failed to stop ${RC_SVCNAME}" +} |