I install memcached server via source and can get standard start up script installed for 1 memcached server instance, but trying several scripts via google, can't find one that works to manager auto start up on boot for multiple memcached server instances. I've tried both these scripts and both don't work, service memcached start just returns to command prompt with no memcached server instances started
However this bash script works but doesn't start up memcached instances at start up though ?
#!/bin/sh case "$1" in start) /usr/local/bin/memcached -d -m 16 -p 11211 -u nobody /usr/local/bin/memcached -d -m 16 -p 11212 -u nobody ;; stop) killall memcached ;; esac
OS: Centos 5.5 64bit Memcached = v1.4.5 Memcache = v2.2.5
Anyone can point me to a working /etc/init.d/ startup script to manage multiple memcached servers ? Thanks
edit: Thanks mat, this is code that ended up working
#!/bin/sh # chkconfig: - 80 12 # description: The memcached daemon is a network memory cache service. # processname: memcached BIN=/usr/local/bin/memcached USER=nobody CON=2048 THREADS=4 $BIN -d -m 16 -p 11211 -c $CON -t $THREADS -u $USER $BIN -d -m 16 -p 11212 -c $CON -t $THREADS -u $USER case "$1" in start) $BIN -d -m 16 -p 11211 -c $CON -t $THREADS -u $USER $BIN -d -m 16 -p 11212 -c $CON -t $THREADS -u $USER ;; stop) killall $BIN ;; esac