1
Index: memcached-1.4.5/scripts/memcached-init
2
===================================================================
3
--- memcached-1.4.5.orig/scripts/memcached-init
4
+++ memcached-1.4.5/scripts/memcached-init
8
-# skeleton example file to build /etc/init.d/ scripts.
9
-# This file should be used to construct scripts for /etc/init.d.
11
-# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
12
-# Modified for Debian
13
-# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
15
-# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl
18
-# Provides: memcached
19
-# Required-Start: $syslog
20
-# Required-Stop: $syslog
21
-# Default-Start: 2 3 4 5
22
-# Default-Stop: 0 1 6
23
-# Short-Description: Start memcached daemon at boot time
24
-# Description: Enable memcached server
25
+# Provides: memcached
26
+# Required-Start: $remote_fs $syslog
27
+# Required-Stop: $remote_fs $syslog
28
+# Should-Start: $local_fs
29
+# Should-Stop: $local_fs
30
+# Default-Start: 2 3 4 5
31
+# Default-Stop: 0 1 6
32
+# Short-Description: Start memcached daemon
33
+# Description: Start up memcached, a high-performance memory caching daemon
37
@@ -32,38 +24,50 @@ test -x $DAEMONBOOTSTRAP || exit 0
41
+. /lib/lsb/init-functions
43
+# Edit /etc/default/memcached to change this.
45
+test -r /etc/default/memcached && . /etc/default/memcached
49
- echo -n "Starting $DESC: "
50
- start-stop-daemon --start --quiet --exec $DAEMONBOOTSTRAP
54
- echo -n "Stopping $DESC: "
55
- start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON
60
- restart|force-reload)
62
- # If the "reload" option is implemented, move the "force-reload"
63
- # option to the "reload" entry above. If not, "force-reload" is
64
- # just the same as "restart".
66
- echo -n "Restarting $DESC: "
67
- start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
70
- start-stop-daemon --start --quiet --exec $DAEMONBOOTSTRAP
75
- # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
76
- echo "Usage: $N {start|stop|restart|force-reload}" >&2
80
+ echo -n "Starting $DESC: "
81
+ if [ $ENABLE_MEMCACHED = yes ]; then
82
+ start-stop-daemon --start --quiet --exec $DAEMONBOOTSTRAP
85
+ echo "$NAME disabled in /etc/default/memcached."
89
+ echo -n "Stopping $DESC: "
90
+ start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON
95
+ restart|force-reload)
97
+ # If the "reload" option is implemented, move the "force-reload"
98
+ # option to the "reload" entry above. If not, "force-reload" is
99
+ # just the same as "restart".
101
+ echo -n "Restarting $DESC: "
102
+ start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
105
+ start-stop-daemon --start --quiet --exec $DAEMONBOOTSTRAP
109
+ status_of_proc $DAEMON $NAME
112
+ N=/etc/init.d/$NAME
113
+ echo "Usage: $N {start|stop|restart|force-reload|status}" >&2