summaryrefslogtreecommitdiff
path: root/net-misc/apt-cacher-ng/files/initd-r3
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-02-13 21:41:11 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-02-13 21:41:11 +0000
commitc8d60dada2ec8eb48b2d2b290cd6683ccec40e39 (patch)
treec44943ee0563a3fa957716de909fed683117fcb9 /net-misc/apt-cacher-ng/files/initd-r3
parent69051588e2f955485fe5d45d45e616bc60a2de57 (diff)
gentoo (valentine's day) resync : 14.02.2021
Diffstat (limited to 'net-misc/apt-cacher-ng/files/initd-r3')
-rw-r--r--net-misc/apt-cacher-ng/files/initd-r320
1 files changed, 20 insertions, 0 deletions
diff --git a/net-misc/apt-cacher-ng/files/initd-r3 b/net-misc/apt-cacher-ng/files/initd-r3
new file mode 100644
index 000000000000..665b0e46bcab
--- /dev/null
+++ b/net-misc/apt-cacher-ng/files/initd-r3
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+CACHEDIR="/var/cache/${RC_SVCNAME}"
+SOCKETDIR="/run/apt-cacher-ng"
+SOCKETFILE="${SOCKETDIR}/${RC_SVCNAME}.socket"
+
+command="/usr/sbin/apt-cacher-ng"
+command_args="SocketPath=${SOCKETFILE} foreground=1 ${APT_CACHER_NG_ARGS}"
+command_background="true"
+command_user="apt-cacher-ng:apt-cacher-ng"
+pidfile="/run/${RC_SVCNAME}.pid"
+retry="15"
+
+start_pre() {
+ for d in "${SOCKETDIR}" "${CACHEDIR}"; do
+ checkpath --directory --mode 0755 --owner "${command_user}" "${d}"
+ done
+}