View | Details | Raw Unified | Return to bug 24731
Collapse All | Expand All

(-)apt-cacher-ng-0.5.12.orig/acng.init (+63 lines)
Line 0 Link Here
1
#!/bin/sh
2
#
3
# Start/stop apt-cacher-ng
4
#
5
# chkconfig: 345 99 01
6
# description: APT caching HTTP proxy (apt-cacher-ng)
7
#
8
9
# Source function library.
10
. /etc/rc.d/init.d/functions
11
12
PROG=apt-cacher-ng
13
ARGS="-c /etc/apt-cacher-ng"
14
LOCKFILE=/var/lock/subsys/acng
15
RETVAL=0
16
17
start()
18
{
19
	start_daemon --lockfile "$LOCKFILE" $PROG $ARGS
20
	RETVAL=$?
21
	return $RETVAL
22
}
23
24
stop()
25
{
26
	stop_daemon --lockfile "$LOCKFILE" $PROG
27
	RETVAL=$?
28
	return $RETVAL
29
}
30
31
restart()
32
{
33
	stop
34
	start
35
}
36
37
case "$1" in
38
	start)
39
		start
40
		;;
41
	stop)
42
		stop
43
		;;
44
        reload|restart)
45
		restart
46
                ;;
47
        condstop)
48
	        if [ -e "$LOCKFILE" ]; then
49
		        stop
50
		fi
51
		;;
52
	condrestart)
53
		;;
54
	status)
55
		status --lockfile "$LOCKFILE" $PROG
56
		;;
57
	*)
58
		msg_usage "Usage: ${0##*/} {start|stop|reload|restart|condstop|condrestart|status}"
59
		RETVAL=1
60
		;;
61
esac
62
63
exit $RETVAL

Return to bug 24731