summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/apt-cacher-ng/files')
-rw-r--r--net-misc/apt-cacher-ng/files/confd2
-rw-r--r--net-misc/apt-cacher-ng/files/cron.daily15
-rw-r--r--net-misc/apt-cacher-ng/files/initd33
-rw-r--r--net-misc/apt-cacher-ng/files/initd-r134
-rw-r--r--net-misc/apt-cacher-ng/files/logrotate15
5 files changed, 99 insertions, 0 deletions
diff --git a/net-misc/apt-cacher-ng/files/confd b/net-misc/apt-cacher-ng/files/confd
new file mode 100644
index 000000000000..72e76de133d1
--- /dev/null
+++ b/net-misc/apt-cacher-ng/files/confd
@@ -0,0 +1,2 @@
+# Additional options that are passed to the Daemon.
+DAEMON_OPTS=" -c /etc/apt-cacher-ng "
diff --git a/net-misc/apt-cacher-ng/files/cron.daily b/net-misc/apt-cacher-ng/files/cron.daily
new file mode 100644
index 000000000000..b5ea1436709c
--- /dev/null
+++ b/net-misc/apt-cacher-ng/files/cron.daily
@@ -0,0 +1,15 @@
+#!/bin/sh
+# Run the expire function of apt-cacher-ng non-interactively (unless errors
+# are detected).
+
+# optional, specify hostname to appear in error messages and links
+# HOSTNAME=externallyVisibleHostName
+# export HOSTNAME
+
+# optional, specify IP address to connect to
+# ACNGIP=10.0.1.3
+# export ACNGIP
+
+if test -r /usr/sbin/expire-caller.pl ; then
+ perl /usr/sbin/expire-caller.pl || echo Check error messages in /var/log/apt-cacher-ng/maint_*.log
+fi
diff --git a/net-misc/apt-cacher-ng/files/initd b/net-misc/apt-cacher-ng/files/initd
new file mode 100644
index 000000000000..7718da4dae8c
--- /dev/null
+++ b/net-misc/apt-cacher-ng/files/initd
@@ -0,0 +1,33 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+NAME="apt-cacher-ng"
+DAEMON="/usr/sbin/$NAME"
+RUNDIR="/var/run/$NAME"
+PIDFILE="$RUNDIR/$NAME.pid"
+SOCKETFILE="$RUNDIR/$NAME.socket"
+DAEMON_OPTS="$DAEMON_OPTS pidfile=$PIDFILE SocketPath=$SOCKETFILE foreground=0"
+
+depend() {
+ use net
+}
+
+start() {
+ ebegin "Starting $NAME"
+ checkpath -d -m 0755 -o ${NAME}:${NAME} ${RUNDIR}
+ start-stop-daemon --start --exec $DAEMON \
+ --user $NAME --group $NAME \
+ --pidfile $PIDFILE \
+ -- $DAEMON_OPTS
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping $NAME"
+ start-stop-daemon --stop --retry 15 --exec $DAEMON \
+ --pidfile $PIDFILE
+ rm -f $PIDFILE
+ eend $?
+}
diff --git a/net-misc/apt-cacher-ng/files/initd-r1 b/net-misc/apt-cacher-ng/files/initd-r1
new file mode 100644
index 000000000000..dfbdd04bb085
--- /dev/null
+++ b/net-misc/apt-cacher-ng/files/initd-r1
@@ -0,0 +1,34 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DAEMON="/usr/sbin/${RC_SVCNAME}"
+RUNDIR="/var/run/${RC_SVCNAME}"
+CACHEDIR="var/cache/${RC_SVCNAME}"
+PIDFILE="${RUNDIR}/${RC_SVCNAME}.pid"
+SOCKETFILE="${RUNDIR}/${RC_SVCNAME}.socket"
+DAEMON_OPTS="${DAEMON_OPTS} pidfile=${PIDFILE} SocketPath=${SOCKETFILE} foreground=0"
+
+depend() {
+ use net
+}
+
+start() {
+ ebegin "Starting ${RC_SVCNAME}"
+ checkpath -d -m 0755 -o ${RC_SVCNAME}:${RC_SVCNAME} "${RUNDIR}"
+ checkpath -d -m 0755 -o ${RC_SVCNAME}:${RC_SVCNAME} "${CACHEDIR}"
+ start-stop-daemon --start --exec ${DAEMON} \
+ --user ${RC_SVCNAME} --group ${RC_SVCNAME} \
+ --pidfile ${PIDFILE} \
+ -- ${DAEMON_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${RC_SVCNAME}"
+ start-stop-daemon --stop --retry 15 --exec ${DAEMON} \
+ --pidfile ${PIDFILE}
+ rm -f ${PIDFILE}
+ eend $?
+}
diff --git a/net-misc/apt-cacher-ng/files/logrotate b/net-misc/apt-cacher-ng/files/logrotate
new file mode 100644
index 000000000000..330f2b6b6616
--- /dev/null
+++ b/net-misc/apt-cacher-ng/files/logrotate
@@ -0,0 +1,15 @@
+/var/log/apt-cacher-ng/*.log {
+ size 10M
+ missingok
+ rotate 12
+ compress
+ delaycompress
+ notifempty
+ create
+ postrotate
+ if [ -s /var/run/apt-cacher-ng/apt-cacher-ng.pid ] ; then
+ kill -s USR1 "$(cat /var/run/apt-cacher-ng/apt-cacher-ng.pid)"
+ fi
+ endscript
+}
+