Memcached启动脚本

ched:    MemCached Daemon   
#   
# chkconfig:    - 90 25  
# description:  MemCached Daemon   
#   
# Source function library.   
. /etc/rc.d/init.d/functions   
. /etc/sysconfig/network   
#[ ${NETWORKING} = "no" ] && exit 0  
#[ -r /etc/sysconfig/dund ] || exit 0  
#. /etc/sysconfig/dund   
#[ -z "$DUNDARGS" ] && exit 0  
start()   
{   
        echo -n $"Starting memcached: "  
        daemon $MEMCACHED -u daemon -d -m 1024 -l 0.0.0.0 -p 11211  
        echo   
}   
stop()   
{   
        echo -n $"Shutting down memcached: "  
        killproc memcached   
        echo   
}   
MEMCACHED="/usr/local/memcached/bin/memcached"  
[ -f $MEMCACHED ] || exit 1  
# See how we were called.   
case "$1" in   
  start)   
        start   
        ;;   
  stop)   
        stop   
        ;;   
  restart)   
        stop   
        sleep 3  
        start   
        ;;   
    *)   
        echo $"Usage: $0 {start|stop|restart}"  
        exit 1  
esac   
exit 0  

部分文件路径,参数,需要修改!

转载于:https://www.cnblogs.com/tengpan-cn/p/5981625.html

你可能感兴趣的:(Memcached启动脚本)