File: memcached.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 (25 lines) | stat: -rw-r--r-- 571 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
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