Confluence init script for Gentoo

Version 4 by Nick Ragusa
on Jul 06, 2009 20:22.

compared with
Current by Nick Ragusa
on Mar 29, 2010 01:00.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (4)

View Page History
Wow ... long time no post.

Since the site got a facelift, I've decided to try and be more proactive about making posts, adding projects to the [Projects|ht:Home] space, etc. (Oddly enough I recall saying this to myself a few other times before). Who knows, maybe this time will be different now that I've retired Drupal and Gallery for good, and am sticking to Confluene for content and [http://gallery.me.com/nickragusa] for [http://picasaweb.google.com/nragusa]  for pictures.

And so on to the content. I created this init script for starting / stopping / restarting Confluence in Gentoo. I was pleasantly surprised when I ran
vi /etc/init.d/confluence
{code}
and was presented a skeleton init script\! Truth be told I use RHEL on a day to day basis so my Gentoo skillz / knowledge are lacking. Either way, a few man pages later about the {{start-stop-daemon}}, I crafted up this [script|http://www.nickragusa.com/websvn/filedetails.php?repname=HowTos&path=%2FConfluence-Init%2Fconfluence]. I've tried to make it as configurable as possible so be sure to pay close attention to the variables defined at the top. Some things to bare in mind:

* I use Apache to proxy requests to Confluence, thus it depends on apache2
* Ideally it should use the {{shutdown.sh}} file to stop the daemon, but it's not clear to me how to execute a script to stop a service via the {{start-stop-daemon}}.
* I threw a {{sleep 3}} in between {{svc_stop}} and {{svc_start}} just to give Confluence a few seconds to shutdown.

Here's the [script|http://www.nickragusa.com/websvn/filedetails.php?repname=HowTos&path=%2FConfluence-Init%2Fconfluence].