File: memcached-server.upstart

package info (click to toggle)
memcached 1.5.6-1.1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,696 kB
  • sloc: ansic: 16,931; perl: 5,523; sh: 4,302; xml: 1,638; python: 393; makefile: 170
file content (26 lines) | stat: -rw-r--r-- 716 bytes parent folder | download | duplicates (3)
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