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 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 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
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. 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.
