~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/memcached_functions/tests/start_mc.sh.in

Startup/fixin' for memcached testing

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
 
 
3
PORT=19191
 
4
if [ $MC_PORT ]; then
 
5
  PORT=$MC_PORT
 
6
fi
 
7
 
 
8
MAXCONN=1024
 
9
CACHESIZE=1024
 
10
OPTIONS=""
 
11
 
 
12
startup()
 
13
{
 
14
  @MEMCACHED_BINARY@ -d -p $PORT -m $CACHESIZE -c $MAXCONN -U 0 -P /tmp/memc.pid.$PORT
 
15
}
 
16
 
 
17
shutdown()
 
18
{
 
19
  if [ -f /tmp/memc.pid.$PORT ]
 
20
  then
 
21
    kill -9 `cat /tmp/memc.pid.$PORT`
 
22
    rm /tmp/memc.pid.$PORT
 
23
  fi
 
24
}
 
25
 
 
26
restart()
 
27
{
 
28
  shutdown
 
29
  startup
 
30
}
 
31
 
 
32
 
 
33
# See how we were called.
 
34
case "$1" in
 
35
  start)
 
36
        startup
 
37
        ;;
 
38
  stop)
 
39
        shutdown
 
40
        ;;
 
41
  restart|reload)
 
42
        restart
 
43
        ;;
 
44
  *)
 
45
        echo $"Usage: $0 {start|stop|restart|reload}"
 
46
        exit 1
 
47
esac
 
48
 
 
49
exit $?
 
50