File: memcached.upstart

package info (click to toggle)
memcached 1.6.39-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,280 kB
  • sloc: ansic: 62,281; perl: 12,500; sh: 4,569; makefile: 476; python: 402; xml: 59
file content (25 lines) | stat: -rw-r--r-- 571 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
description "memcached - high performance memory caching daemon"
author "Cameron Norman <camerontnorman@gmail.com>"

start on filesystem
stop on runlevel [016]

pre-start script
    ret=0

    test -x /usr/bin/memcached || { stop; exit 0; }

    # Main
    start memcached-server || ret=$?
    # Instances
    for i in /etc/memcached_*.conf; do
        i=${i#/etc/memcached_}
        i=${i%.conf}
        test "$i" = "*" && continue
        start memcached-server SERVER=$i || ret=$?
    done

    exit $ret
end script

post-stop exec initctl emit stop-memcached-servers