]> Frank Brehm's Git Trees - config/samara/etc.git/commitdiff
committing changes in /etc after emerge run
authorroot <root@samara.profitbricks.localdomain>
Tue, 14 Aug 2012 17:20:52 +0000 (19:20 +0200)
committerroot <root@samara.profitbricks.localdomain>
Tue, 14 Aug 2012 17:20:52 +0000 (19:20 +0200)
Package changes:
+net-misc/memcached-1.4.5-r1

.etckeeper
conf.d/memcached [new file with mode: 0644]
init.d/memcached [new file with mode: 0755]

index c51e361901fd41f920a455e255395d39dd435079..d81be9de0c1628fb9e9c790251603c9c3c6ce1e6 100755 (executable)
@@ -256,6 +256,7 @@ maybe chmod 0644 './conf.d/localmount'
 maybe chmod 0644 './conf.d/lvm'
 maybe chmod 0644 './conf.d/mdadm'
 maybe chmod 0644 './conf.d/mdraid'
+maybe chmod 0644 './conf.d/memcached'
 maybe chmod 0644 './conf.d/modules'
 maybe chmod 0644 './conf.d/mysql'
 maybe chmod 0644 './conf.d/nas'
@@ -1251,6 +1252,7 @@ maybe chmod 0755 './init.d/lvm'
 maybe chmod 0755 './init.d/lvm-monitoring'
 maybe chmod 0755 './init.d/mdadm'
 maybe chmod 0755 './init.d/mdraid'
+maybe chmod 0755 './init.d/memcached'
 maybe chmod 0755 './init.d/mit-krb5kadmind'
 maybe chmod 0755 './init.d/mit-krb5kdc'
 maybe chmod 0755 './init.d/mit-krb5kpropd'
diff --git a/conf.d/memcached b/conf.d/memcached
new file mode 100644 (file)
index 0000000..7acf662
--- /dev/null
@@ -0,0 +1,35 @@
+# Copyright 2003 Gentoo Technologies, Inc
+# $Header: /var/cvsroot/gentoo-x86/net-misc/memcached/files/1.3.3/conf,v 1.1 2009/05/26 00:03:09 robbat2 Exp $
+# memcached config file
+
+MEMCACHED_BINARY="/usr/bin/memcached"
+
+#Specify memory usage in megabytes (do not use letters)
+#64MB is default
+MEMUSAGE="64"
+
+#User to run as
+MEMCACHED_RUNAS="memcached"
+
+#Specify maximum number of concurrent connections
+#1024 is default
+MAXCONN="1024"
+
+#Listen for connections on what address?
+# If this is empty, memcached will listen on 0.0.0.0
+# be sure you have a firewall in place!
+LISTENON=""
+
+#Listen for connections on what port?
+PORT="11211"
+
+# Listen for UDP connecitons on what port? 0 means turn off UDP
+UDPPORT="${PORT}"
+
+#PID file location
+# '-${PORT}.${CONF}.pid' will be appended to this!
+# You do not normally need to change this.
+PIDBASE="/var/run/memcached/memcached"
+
+#Other Options
+MISC_OPTS=""
diff --git a/init.d/memcached b/init.d/memcached
new file mode 100755 (executable)
index 0000000..6c9d2a6
--- /dev/null
@@ -0,0 +1,78 @@
+#!/sbin/runscript
+# $Header: /var/cvsroot/gentoo-x86/net-misc/memcached/files/1.3.3/init,v 1.2 2011/12/31 20:36:20 idl0r Exp $
+
+CONF="${SVCNAME#*.}"
+CONFBASE="/etc/conf.d/memcached"
+
+[ -z "${PIDBASE}" ] && PIDBASE="/var/run/memcached/memcached"
+[ "${CONF}" == "memcached" ] && CONF=''
+
+if [ -n "${CONF}" ]; then
+        PIDFILE="${PIDBASE}-${PORT}.${CONF}.pid"
+        CONFSRC="${CONFBASE}.${CONF}"
+        if [ -f "${CONFSRC}" ]; then
+         source "${CONFSRC}"
+        else
+         eerror "The configuration file $CONFSRC was not found!"
+        fi
+else
+        PIDFILE="${PIDBASE}-${PORT}.pid"
+        CONFSRC="${CONFBASE}"
+fi
+
+depend() {
+        need net
+               # per bug #269022, accurate time is important for memcached!
+               # We include the full list of ways it might be set on boot.
+               after ntp-client ntpd rdate openrdate adjtimex hwclock
+}
+
+checkconfig() {
+        if [ -z "${LISTENON}" ]; then
+          ewarn "You should edit $CONFSRC and specify an address to listen on."
+          ewarn "Listening on any address (check your firewall!)"
+        fi
+}
+
+start() {
+        if [ -n "${CONF}" ]; then
+                ebegin "Starting memcached (${CONF})"
+        else
+                ebegin "Starting memcached"
+        fi
+        checkconfig
+        local dir="$(dirname ${PIDFILE})"
+        if [ ! -d "${dir}" ]; then
+          einfo " Creating ${dir}"
+          mkdir -p "${dir}"
+        fi
+        chown ${MEMCACHED_RUNAS} "${dir}"
+        if [ -f "${PIDFILE}" ]; then
+          einfo "  Removing stale pidfile ${PIDFILE}"
+          rm -f "${PIDFILE}" 1>/dev/null
+        fi
+
+        if [ -z "${LISTENON}" ]; then
+          c_LISTENON=""
+        else
+          c_LISTENON="-l ${LISTENON}"
+        fi
+
+        /sbin/start-stop-daemon --start --pidfile "${PIDFILE}" \
+                --exec "${MEMCACHED_BINARY}" -- \
+                -d -p ${PORT} -U ${UDPPORT} ${c_LISTENON} -m ${MEMUSAGE} \
+                -c ${MAXCONN} -u ${MEMCACHED_RUNAS} -P "${PIDFILE}" \
+                               ${MISC_OPTS}
+        eend $?
+}
+
+stop() {
+        if [ -n "${CONF}" ]; then
+                ebegin "Stopping memcached (${CONF})"
+        else
+                ebegin "Stopping memcached"
+        fi
+        start-stop-daemon --stop --quiet --pidfile "${PIDFILE}"
+        rm -f "${PIDFILE}"
+        eend $?
+}