File: memcached.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 (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