Debian Codegraph @

scripts/memcached-server.upstart

raw
1 description "memcached-server - high-performance memory caching daemon (instance)"
2 author "Cameron Norman <[email protected]>"
3
4 stop on stop-memcached-servers or runlevel [016]
5
6 expect daemon
7 respawn
8
9 # Instance w/ default value so main server starts without SERVER param
10 env SERVER=""
11 instance $SERVER
12 usage "SERVER - instance of memcached with corresponding /etc/memcached_$SERVER config"
13
14 script
15 if test "x$SERVER" = "x"; then
16 name="memcached"
17 else
18 name="memcached_$SERVER"
19 fi
20
21 test -f /etc/${name}.conf || {
22 echo "No config found, not starting."; exit 1
23 }
24
25 exec /usr/share/memcached/scripts/start-memcached /etc/${name}.conf /var/run/${name}.pid
26 end script