1description "memcached-server - high-performance memory caching daemon (instance)" 2author "Cameron Norman <[email protected]>" 3 4stop on stop-memcached-servers or runlevel [016] 5 6expect daemon 7respawn 8 9# Instance w/ default value so main server starts without SERVER param 10env SERVER="" 11instance $SERVER 12usage "SERVER - instance of memcached with corresponding /etc/memcached_$SERVER config" 13 14script 15 if test "x$SERVER" = "x"; then 16 name="memcached" 17 else 18 name="memcached_$SERVER" 19 fi 20 21 test -f /etc/${name}.conf || { 22 echo "No config found, not starting."; exit 1 23 } 24 25 exec /usr/share/memcached/scripts/start-memcached /etc/${name}.conf /var/run/${name}.pid 26end script 27