Debian Codegraph @

scripts/memcached.upstart

raw
1 description "memcached - high performance memory caching daemon"
2 author "Cameron Norman <[email protected]>"
3
4 start on filesystem
5 stop on runlevel [016]
6
7 pre-start script
8 ret=0
9
10 test -x /usr/bin/memcached || { stop; exit 0; }
11
12 # Main
13 start memcached-server || ret=$?
14 # Instances
15 for i in /etc/memcached_*.conf; do
16 i=${i#/etc/memcached_}
17 i=${i%.conf}
18 test "$i" = "*" && continue
19 start memcached-server SERVER=$i || ret=$?
20 done
21
22 exit $ret
23 end script
24
25 post-stop exec initctl emit stop-memcached-servers