From a540c3434c185b7e4ffe8395884892c3e75173bb Mon Sep 17 00:00:00 2001 From: David P Date: Sun, 17 Jul 2022 19:10:38 -0400 Subject: addpkg: nonsystemd/docker-openrc 20210505-1 Signed-off-by: David P --- nonsystemd/docker-openrc/PKGBUILD | 25 +++++++++++++++++++++++++ nonsystemd/docker-openrc/docker.confd | 29 +++++++++++++++++++++++++++++ nonsystemd/docker-openrc/docker.initd | 28 ++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 nonsystemd/docker-openrc/PKGBUILD create mode 100644 nonsystemd/docker-openrc/docker.confd create mode 100644 nonsystemd/docker-openrc/docker.initd (limited to 'nonsystemd') 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 +# Contributor: artoo +# Contributor: Oscar Campos + +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}" +} -- cgit v1.2.3