Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 374223
Collapse All | Expand All

(-)memcached_old (-6 / +18 lines)
Lines 9-14 Link Here
9
9
10
if [ -n "${CONF}" ]; then
10
if [ -n "${CONF}" ]; then
11
        PIDFILE="${PIDBASE}-${PORT}.${CONF}.pid"
11
        PIDFILE="${PIDBASE}-${PORT}.${CONF}.pid"
12
        SOCKFILE="${PIDBASE}-${PORT}.${CONF}.sock"
12
        CONFSRC="${CONFBASE}.${CONF}"
13
        CONFSRC="${CONFBASE}.${CONF}"
13
        if [ -f "${CONFSRC}" ]; then
14
        if [ -f "${CONFSRC}" ]; then
14
         source "${CONFSRC}"
15
         source "${CONFSRC}"
Lines 17-22 Link Here
17
        fi
18
        fi
18
else
19
else
19
        PIDFILE="${PIDBASE}-${PORT}.pid"
20
        PIDFILE="${PIDBASE}-${PORT}.pid"
21
        SOCKFILE="${PIDBASE}.sock"
20
        CONFSRC="${CONFBASE}"
22
        CONFSRC="${CONFBASE}"
21
fi
23
fi
22
24
Lines 40-46 Link Here
40
        else
42
        else
41
                ebegin "Starting memcached"
43
                ebegin "Starting memcached"
42
        fi
44
        fi
43
        checkconfig
45
		if [[ "${PORT}" != "unix" ]]; then
46
	        checkconfig
47
		fi
44
        local dir="$(dirname ${PIDFILE})"
48
        local dir="$(dirname ${PIDFILE})"
45
        if [ ! -d "${dir}" ]; then
49
        if [ ! -d "${dir}" ]; then
46
          einfo " Creating ${dir}"
50
          einfo " Creating ${dir}"
Lines 58-68 Link Here
58
          c_LISTENON="-l ${LISTENON}"
62
          c_LISTENON="-l ${LISTENON}"
59
        fi
63
        fi
60
64
61
        /sbin/start-stop-daemon --start --pidfile "${PIDFILE}" \
65
		if [[ "${PORT}" != "unix" ]]; then
62
                --exec "${MEMCACHED_BINARY}" -- \
66
			/sbin/start-stop-daemon --start --pidfile "${PIDFILE}" \
63
                -d -p ${PORT} -U ${UDPPORT} ${c_LISTENON} -m ${MEMUSAGE} \
67
					--exec "${MEMCACHED_BINARY}" -- \
64
                -c ${MAXCONN} -u ${MEMCACHED_RUNAS} -P "${PIDFILE}" \
68
					-d -p ${PORT} -U ${UDPPORT} ${c_LISTENON} -m ${MEMUSAGE} \
65
				${MISC_OPTS}
69
					-c ${MAXCONN} -u ${MEMCACHED_RUNAS} -P "${PIDFILE}" \
70
					${MISC_OPTS}
71
		else
72
			/sbin/start-stop-daemon --start --pidfile "${PIDFILE}" \
73
					--exec "${MEMCACHED_BINARY}" -- \
74
					-d -s ${SOCKFILE} -m ${MEMUSAGE} \
75
					-c ${MAXCONN} -u ${MEMCACHED_RUNAS} -P "${PIDFILE}" \
76
					${MISC_OPTS}
77
		fi
66
        eend $?
78
        eend $?
67
}
79
}
68
80

Return to bug 374223