Hello Campers

I'm not sure this is the right list to ask but: 
I'm using the junebug wiki (which is written in camping) for my own personal 
wiki.  I'd like it to behave as a proper daemon, so it will start up at boot, 
get stopped properly at shutdown, keep a pid file in /var/run etc.

This requires a little messing with the wiki script junebug makes in the wiki 
directory (changing the dirmode to system, amongst other things). Junebug uses 
the daemons gem for this purpose, for those who haven't looked at the gem. This 
 works and I can copy the wiki script to /etc/init.d/ and add the appropriate 
runlevel symlinks with update-rc.d.

Which all works great.  Except that I end with the process running as root. 
Which makes me twitchy and nervous. So I'd to like to make it step down like a 
good little process to a much less privileged user. I can't do this in the 
/etc/init.d/ script, as it then can't write the pid file (and probably other 
things).  But putting it in the setup post amble doesn't seem to work (the wiki 
is still root)

So where should my Process.uid statements go?

Regards,
Jon.
_______________________________________________
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Reply via email to