On Tuesday 21 December 2010 09:00:04 [email protected] wrote:
> Using apt-get, you can automagically install memcached. It's great as
> it starts a daemon and that daemon will start on boot.
> 
> Though for Christmas I need two daemons running on different ports:
> 11211 and 11212.
> 
> I've duplicated the following files and tweaked them, so a second
> daemon can start.
> 
> /etc/init.d/memcached -> /etc/init.d/memcached_11212
> /etc/memcached.conf -> /etc/memcached_11212.conf
> /usr/share/memcached/scripts/start-memcached ->
> /usr/local/share/memcached/scripts/start-memcached
> 
> Using update-rc.d the above daemon starts on boot as well (great).
> 
> Now if memcached has a security update, apt-get will restart the
> original packaged daemon, not my second instance. How can I make my
> second instance upgrade friendly?
> 
> Disclaimer: My new found obsession is upgrade friendliness, so my
> intentions are not strictly memcached related, but it's the simplest
> example I can think of.

Simon, utter respect, but this sounds like UADUFMBS (Unadulterated Unmitigated 
..) The normal way (even with upstart) it to put the daemon start script in 
/etc/init.d [There are skeleton and example files]

Then you can do the distro equivalent of rcmyapp start/stop/restart etc.
I like SuSE's rc[app] paradigsm, so I do 
ln -s /etc/init.d/myapp /usr/sbin/rcmyapp
but that is just detail. Whatever works for you.

In any even, doing it the standard way means no worry about upgrade etc and it 
complies with KISS (keep it simple ..)

There are (google, I cannot remember) sysV init gui management tools you may 
apt-get.

Even the title is misleading - you DO NOT want to mem cache a daemon. The 
system manages the memory caching better than you could!

I confess to being too dismayed at the concept to go and discover what it 
does, but as described this is not a thing to contemplate! Be Warned.

James
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to