SOURCES: memcached.sysconfig (NEW), memcached.init (NEW) - new

arekm arekm at pld-linux.org
Fri Feb 3 23:53:11 CET 2006


Author: arekm                        Date: Fri Feb  3 22:53:11 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- new

---- Files affected:
SOURCES:
   memcached.sysconfig (NONE -> 1.1)  (NEW), memcached.init (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/memcached.sysconfig
diff -u /dev/null SOURCES/memcached.sysconfig:1.1
--- /dev/null	Fri Feb  3 23:53:11 2006
+++ SOURCES/memcached.sysconfig	Fri Feb  3 23:53:06 2006
@@ -0,0 +1,6 @@
+# Customized settings
+
+# Define nice level
+SERVICE_RUN_NICE_LEVEL="+0"
+
+MEMCACHED_OPTS="-l 127.0.0.1"

================================================================
Index: SOURCES/memcached.init
diff -u /dev/null SOURCES/memcached.init:1.1
--- /dev/null	Fri Feb  3 23:53:11 2006
+++ SOURCES/memcached.init	Fri Feb  3 23:53:06 2006
@@ -0,0 +1,67 @@
+#!/bin/sh
+#
+# memcached		memcached
+#
+# chkconfig:	345 60 40
+#
+# description:	memcached is a cache daemon.
+#
+# processname:	memcached
+# pidfile:      /var/run/memcached.pid
+#
+
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get service config
+[ -f /etc/sysconfig/memcached ] && . /etc/sysconfig/memcached
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+	# Check if the service is already running?
+	if [ ! -f /var/lock/subsys/memcached ]; then
+		msg_starting memcached
+		daemon /usr/sbin/memcached -d -u nobody
+		RETVAL=$?
+		[ $RETVAL -eq 0 ] && touch /var/lock/subsys/memcached
+	else
+		msg_already_running memcached
+	fi
+	;;
+  stop)
+	if [ -f /var/lock/subsys/memcached ]; then
+		msg_stopping memcached
+		killproc --pidfile clamav/memcached.pid memcached
+		rm -f /var/run/memcached.pid /var/lock/subsys/memcached >/dev/null 2>&1
+	else
+		msg_not_running memcached
+	fi
+	;;
+  restart)
+	$0 stop
+	$0 start
+	exit $?
+	;;
+  status)
+	status memcached
+	exit $?
+	;;
+  reload|force-reload)
+	if [ -f /var/lock/subsys/memcached ]; then
+		msg_reloading memcached
+		killproc memcached -HUP
+		RETVAL=$?
+	else
+		msg_not_running memcached >&2
+		RETVAL=7
+	fi
+	;;
+  *)
+	msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
+	exit 3
+esac
+
+exit $RETVAL
================================================================


More information about the pld-cvs-commit mailing list