You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/net-misc/apt-cacher-ng/files/initd

33 lines
725 B

#!/sbin/openrc-run
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
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 $?
}