File: memcached-server.upstart

package info (click to toggle)
memcached 1.6.9%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,820 kB
  • sloc: ansic: 21,174; perl: 7,113; sh: 4,340; python: 402; makefile: 202; xml: 59
file content (26 lines) | stat: -rw-r--r-- 716 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
description "memcached-server - high-performance memory caching daemon (instance)"
author "Cameron Norman <camerontnorman@gmail.com>"

stop on stop-memcached-servers or runlevel [016]

expect daemon
respawn

# Instance w/ default value so main server starts without SERVER param
env SERVER=""
instance $SERVER
usage "SERVER - instance of memcached with corresponding /etc/memcached_$SERVER config"

script
    if test "x$SERVER" = "x"; then
        name="memcached"
    else
        name="memcached_$SERVER"
    fi

    test -f /etc/${name}.conf || {
        echo "No config found, not starting."; exit 1
    }

    exec /usr/share/memcached/scripts/start-memcached /etc/${name}.conf /var/run/${name}.pid
end script