Package: apt-cacher
Version: 1.7.6
Severity: minor
Tags: patch
Dear Maintainer,
I'm preparing a server project which uses apt-cacher package.
But init script is not as nice as the others and seems uses old-style
event display.
I've joined an init script which complies with Wheezy start-stop-daemon
usage.
I'll use it in my own project but you could be interested !
Regards
F!nTcH
PS: Init script doesn't seems to be updated, even on 1.7.8 (unstable)
X-Mailer: reportbug 6.4.4
-- System Information:
Debian Release: 7.4
APT prefers stable
APT policy: (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 3.2.0-4-686-pae (SMP w/1 CPU core)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages apt-cacher depends on:
ii debconf [debconf-2.0] 1.5.49
ii dpkg 1.16.12
ii ed 1.6-2
ii libfilesys-df-perl 0.92-4+b1
ii libfreezethaw-perl 0.5001-1
ii libio-interface-perl 1.06-1+b1
ii libnetaddr-ip-perl 4.062+dfsg-1
ii libsys-syscall-perl 0.23-1
ii libwww-curl-perl 4.15-1+b2
ii libwww-perl 6.04-1
ii lsb-base 4.1+Debian8+deb7u1
ii perl 5.14.2-21+deb7u1
ii ucf 3.0025+nmu3
ii update-inetd 4.43
Versions of packages apt-cacher recommends:
ii libberkeleydb-perl 0.51-1
Versions of packages apt-cacher suggests:
pn libio-socket-inet6-perl <none>
-- Configuration Files:
/etc/init.d/apt-cacher changed:
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="Apt-Cacher"
NAME=apt-cacher
DAEMON=/usr/sbin/$NAME
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
test -x $DAEMON || exit 0
if [ -r /etc/default/$NAME ]
then
. /etc/default/$NAME
fi
. /lib/lsb/init-functions
d_start() {
if test "$AUTOSTART" = 1 ; then
start-stop-daemon --start --quiet \
--exec $DAEMON -- -R 3 -d -p $PIDFILE $EXTRAOPT && \
return $?
else
log_warning_msg "Not started (AUTOSTART not enabled in
/etc/default/$NAME)";
return 0
fi
}
d_stop() {
start-stop-daemon --stop --quiet --retry=TERM/10/KILL/5 --pidfile
$PIDFILE \
--name $NAME
# Also stop any running libcurl backend
/usr/share/apt-cacher/libcurl.pl EXIT
}
case "$1" in
start)
log_daemon_msg "Starting $DESC" $NAME
d_start
log_end_msg $?
;;
stop)
log_daemon_msg "Stopping $DESC" $NAME
d_stop
log_end_msg $?
;;
restart)
$0 stop
sleep 1
$0 start
;;
force-reload|reload)
log_daemon_msg "Reloading configuration files for $DESC" $NAME
start-stop-daemon --status --pidfile $PIDFILE
if [ $? != 0 ] ; then
log_warning_msg "Not running!"
else
kill -HUP `cat $PIDFILE`
log_end_msg 0
fi
;;
status)
status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $?
;;
*)
log_action_msg "Usage: $SCRIPTNAME
{start|stop|restart|reload|force-reload|status}"
exit 1
;;
esac
exit 0
-- debconf information:
* apt-cacher/mode: daemon
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]