日期:2014-05-16 浏览次数:20424 次
/lib/libdb-4.3.so /usr/lib/libdb-4.3.so /usr/lib/libdb_cxx-4.3.so /usr/share/doc/db4-4.3.29 /usr/share/doc/db4-4.3.29/LICENSE /usr/share/doc/db4-4.3.29/README
#! /bin/sh # # chkconfig: - 55 45 # description: The memcachedb daemon is a network memory cache service backing by berkeley db. # processname: memcachedb # config: /etc/sysconfig/memcachedb # pidfile: /var/run/memcachedb/memcachedb.pid # Standard LSB functions #. /lib/lsb/init-functions # Source function library. . /etc/init.d/functions PORT=22222 USER=root OPTIONS="" DATADIR=/var/mcdb_data PROCESSID=/var/run/memcachedb/memcachedb.pid PROCESSIDDIR=`dirname $PROCESSID` if [ -f /etc/sysconfig/memcachedb ];then . /etc/sysconfig/memcachedb fi # Check that networking is up. . /etc/sysconfig/network if [ "$NETWORKING" = "no" ] then exit 0 fi RETVAL=0 prog="memcachedb" start () { echo -n $"Starting $prog: " if [ ! -d $PROCESSIDDIR ]; then mkdir $PROCESSIDDIR -p fi # insure that /var/run/memcachedb has proper permissions if [ "`stat -c %U $PROCESSIDDIR`" != "$USER" ]; then chown $USER $PROCESSIDDIR fi daemon --pidfile $PROCESSID /usr/local/bin/memcachedb -d -p $PORT -r -u $USER -H $DATADIR -P $PROCESSID $OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/memcachedb } stop () { echo -n $"Stopping $prog: " killproc -p $PROCESSID /usr/local/bin/memcachedb RETVAL=$? echo if [ $RETVAL -eq 0 ] ; then rm -f /var/lock/subsys/memcachedb rm -f $PROCESSID fi } restart () { stop start } # See how we were called. case "$1" in start) start ;; stop) stop ;; status) status /usr/local/bin/memcachedb ;; restart|reload|force-reload) restart ;; condrestart) [ -f /var/lock/subsys/memcachedb ] && restart || : ;; *) echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}" exit 1 esac exit $?
PORT="22222" USER="root" OPTIONS="" DATADIR="/var/mcdb_data" PROCESSID="/var/run/memcachedb/memcachedb.pid"