Date: Fri, 29 Mar 2024 14:20:08 +0000 (UTC) Message-ID: <453778818.31.1711722008161@2663a04f73dd> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_30_1320561732.1711722008161" ------=_Part_30_1320561732.1711722008161 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
This script is a modification of the one for CentOS 5. It starts= several instances of memcached listing on a set of sequential ports; the m= emcached instances started here, and their ports, must be matched in the co= nfiguration in settings.php in Drupal / Pressflow.
#! /bin= /sh # PORT=3D11211 USER=3Dnobody MAXCONN=3D1024 OPTIONS=3D"" DAEMON=3D/usr/bin/memcached RETVAL=3D0 prog=3D"memcached" start_instance() { echo -n $"Starting $prog ($1): " start-stop-daemon --start --quiet --pidfile /var/run/memcached/memc= ached.$1 .pid --exec $DAEMON -- -d -p $PORT -u $USER -m $2 -c $MAXCONN -P /var/run/= memcache d/memcached.$1.pid $OPTIONS RETVAL=3D$? echo [ $RETVAL -eq 0 ] && touch /var/lock/memcached.$1 PORT=3D`expr $PORT + 1` } stop_instance() { echo -n $"Stopping $prog ($1): " start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/memcac= hed/memc ached.$1.pid --exec $DAEMON=20 RETVAL=3D$? echo if [ $RETVAL -eq 0 ] ; then rm -f /var/lock/memcached.$1 rm -f /var/run/memcached/memcached.$1.pid fi } start () { # insure that /var/run/memcached has proper permissions mkdir -p /var/run/memcached if [ "`stat -c %U /var/run/memcached`" !=3D "$USER" ]; then chown $USER /var/run/memcached fi start_instance default 64; start_instance block 16; start_instance content 128; start_instance filter 128; start_instance form 32; start_instance menu 16; start_instance page 8; start_instance update 8; start_instance views 8; } stop () { stop_instance default; stop_instance block; stop_instance content; stop_instance filter; stop_instance form; stop_instance menu; stop_instance page; stop_instance update; stop_instance views; } restart () { stop start } # See how we were called. case "$1" in start) start ;; stop) stop ;; status) status memcached ;; restart|reload|force-reload) restart ;; *) echo $"Usage: $0 {start|stop|status|restart|reload|force-reload}" exit 1 esac exit $?