mirror of
https://git.freebsd.org/ports.git
synced 2025-06-24 06:00:30 -04:00
simplely hacked from memcached and tugela. But neither of them. Memcachedb is not a cache solution, it is a persistent solution for high-frequency writing and reading. It conforms to memcache protocol (not completed, see below), so any memcached client can have connectivity with memcachedb. Memcachedb uses Berkeley DB as a storing backend, so lots of features including transaction and replication are supported. WWW: http://code.google.com/p/memcachedb/ PR: ports/116548 Submitted by: Gea-Suan Lin <gslin at gslin.org>
35 lines
846 B
Bash
35 lines
846 B
Bash
#!/bin/sh
|
|
# $FreeBSD$
|
|
|
|
# PROVIDE: memcachedb
|
|
# REQUIRE: LOGIN
|
|
# KEYWORD: shutdown
|
|
|
|
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
|
|
# to enable this service:
|
|
#
|
|
# memcachedb_enable (bool): Set to NO by default.
|
|
# Set it to YES to enable memcachedb.
|
|
#
|
|
. %%RC_SUBR%%
|
|
|
|
name="memcachedb"
|
|
rcvar=`set_rcvar`
|
|
|
|
load_rc_config $name
|
|
|
|
: ${memcachedb_bind="127.0.0.1"}
|
|
: ${memcachedb_dbfile="/var/db/memcachedb/default.db"}
|
|
: ${memcachedb_dbpath="/var/db/memcachedb"}
|
|
: ${memcachedb_enable="NO"}
|
|
: ${memcachedb_pidfile="/var/run/memcachedb.pid"}
|
|
: ${memcachedb_port="11211"}
|
|
: ${memcachedb_user="nobody"}
|
|
|
|
command=%%PREFIX%%/sbin/${name}
|
|
command_args="-p ${memcachedb_port} -l ${memcachedb_bind} -d -u ${memcachedb_user} -f ${memcachedb_dbfile} -H ${memcachedb_dbpath} -P ${memcachedb_pidfile}"
|
|
|
|
unset memcachedb_user
|
|
|
|
run_rc_command "$1"
|
|
|