diff options
Diffstat (limited to 'net-misc/memcached/files/1.1.13/init')
-rw-r--r-- | net-misc/memcached/files/1.1.13/init | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/net-misc/memcached/files/1.1.13/init b/net-misc/memcached/files/1.1.13/init deleted file mode 100644 index 24dff246ce92..000000000000 --- a/net-misc/memcached/files/1.1.13/init +++ /dev/null @@ -1,47 +0,0 @@ -#!/sbin/openrc-run -# $Id$ - -depend() { - need net -} - -checkconfig() { - if [ -z "${LISTENON}" ]; then - ewarn "You should edit /etc/conf.d/memcached and specify an address to listen on." - ewarn "Listening on any address (I hope your firewall is set up properly)" - fi -} - -start() { - ebegin "Starting memcached" - checkconfig - local dir="$(dirname ${PIDFILE})" - if [ ! -d "${dir}" ]; then - einfo " Creating ${dir}" - mkdir -p "${dir}" - fi - chown ${MEMCACHED_RUNAS} "${dir}" - if [ -f ${PIDFILE} ]; then - einfo " Removing stale pidfile ${PIDFILE}" - rm -f ${PIDFILE} 1>/dev/null - fi - - if [ -z "${LISTENON}" ]; then - c_LISTENON="" - else - c_LISTENON="-l ${LISTENON}" - fi - - /sbin/start-stop-daemon --start --pidfile ${PIDFILE} \ - --exec ${MEMCACHED_BINARY} -- \ - -d -p ${PORT} ${c_LISTENON} -m ${MEMUSAGE} \ - -c ${MAXCONN} -u ${MEMCACHED_RUNAS} -P ${PIDFILE} ${MISC_OPTS} - eend $? -} - -stop() { - ebegin "Stopping memcached" - start-stop-daemon --stop --quiet --pidfile ${PIDFILE} - rm -f ${PIDFILE} - eend $? -} |