blob: 10a8d0a3942abf02090a19ccb6efd92a551700b0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/bin/sh /etc/rc.common
# Copyright (C) 2010-2011 OpenWrt.org
START=80
start_instance () {
local section="$1"
config_get user "$section" user
config_get maxconn "$section" maxconn
config_get listen "$section" listen
config_get port "$section" port
config_get memory "$section" memory
service_start /usr/bin/memcached -d -u ${user:-memcached} \
-c ${maxconn:-1024} -l ${listen:-0.0.0.0} \
-p ${port:-11211} -U ${port:-11211} -m ${memory:-64}
}
start() {
config_load 'memcached'
config_foreach start_instance 'memcached'
}
stop() {
service_stop /usr/bin/memcached
}
|