how to run 2 instance of memcached from rc.conf?
Lei Sun
lei.sun at gmail.com
Wed Jul 27 06:16:45 GMT 2005
Hi,
I am trying to run 2 instance of memcached from rc.conf, but whenever
I try to start it the second time, it tells me that the instance is
already running.
Please help...
my rc.conf
--------------------------------------------
defaultrouter="192.168.0.1"
hostname="aphrodite.us.8po.com"
ifconfig_em0="inet 192.168.0.200 netmask 255.255.255.0"
sshd_enable="YES"
mysql_enable="YES"
mysql_limits="YES"
apache_enable="YES"
memcached_enable="YES"
memcached_flags="-m 1024 -l 127.0.0.1 -p 11211"
-----------------------------------------------
my /usr/local/etc/rc.d/memcached.sh
----------------------------------------------
#!/bin/sh
#
# PROVIDE: memcached
# REQUIRE: NETWORKING
#
# Add the following lines to /etc/rc.conf to run memcached:
#
# memcached_enable="YES"
# memcached_flags=""
#
. /etc/rc.subr
name="memcached"
rcvar=`set_rcvar`
command=/usr/local/bin/memcached
command_args="-du nobody ${memcached_flags}"
load_rc_config $name
run_rc_command "$1"
--------------------------------------------------
More information about the freebsd-questions
mailing list