File: check-memcached-runs

package info (click to toggle)
python-tooz 2.7.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 764 kB
  • sloc: python: 5,629; sh: 147; makefile: 25
file content (12 lines) | stat: -rwxr-xr-x 356 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh

set -e
set -x

# If it's already up, don't do anything
IS_UP=`netstat -anle | grep LISTEN | grep 127.0.0.1:11211 | awk '{print $4}'`
if [ "${IS_UP}" = "127.0.0.1:11211" ] ; then
	exit 0
fi

/sbin/start-stop-daemon --start --background --quiet --make-pidfile --pidfile `pwd`/TEST_PID_MEMCACHE.pid --exec /usr/bin/memcached -- /etc/memcached.conf