I asked this question at Atlassian but figured serverfault might be more appropriate as it's more of a sysadmin question than an Atlassian question:
I have been attempting to follow this guide to have FishEye+Crucible start at boot. JIRA is already installed and running as it's own user (jira) on Ubuntu at boot, but I cannot get Fisheye+Crucible (aka fecru) to do the same.
I followed the instructions there (and Ubuntu related note in the comments of the page) and rebooted, JIRA started on it's own as usual but fecru did not. Does it have something to do with the RUN_AS variable, which I set to 'jira'? Will that command run at boot without prompting for a password for the user 'jira'? I figured it would not prompt because the program JIRA starts at boot fine as that user...
Using:
Ubuntu 10.04 Lucid
Jira 5.0
Crucible+Fisheye 2.7.11
As this question popped up again and the answers are now outdated since the switch to systemd by the major distributions I'll add my systemd service definition for JIRA:
/etc/systemd/system/jira.service
/etc/sysconfig/jira
Replace
/path/to/jira
with your application directory.For the other Atlassian tools it's basically the same, just the startup scripts and the PID file location differ slightly:
Confluence
$appdir/bin/startup.sh
$appdir/bin/shutdown.sh
$appdir/work/catalina.pid
FishEye
$appdir/bin/start.sh
$appdir/bin/stop.sh
Bamboo
$appdir/bin/start-bamboo.sh
$appdir/bin/stop-bamboo.sh
Crowd
$appdir/bin/startup.sh
$appdir/bin/shutdown.sh
$appdir/apache-tomcat/work/catalina.pid
FishEye doesn't have support for a PID file yet, so currently it is necessary to use the workaround from that issue and add this line to
fisheyectl.sh
after thenohop
command:For Bamboo the PID file has to be explicitly defined via the
CATALINA_PID
variable (see$appdir/bin/catalina.sh
). I haven't tested it yet, but it should be possible to set this variable in theEnvironmentFile
file.After the service definitions are created:
Relevant bits of init script I use:
Contents of startf.sh:
stopf.sh:
Relevant contents of .profile:
Of course I could have added the source .profile statement in the fisheye provided start and stop scripts, but that would mean having to edit it again after an upgrade. I tried to keep the fisheye files unchanged as much as possible.
I realize this is an old thread, but I was unable to find an answer, so here it is:
edit fisheyectl.sh and change
nohup sh -c "exec $CMD" >> $FISHEYE_INST/var/log/fisheye.out 2>&1 &
to not use nohup (because upstart wants it to run in foreground:The create your /etc/init/fisheye.conf file (I named mine crucible, but doesn't matter):
Note, you may need to alter the setuid and setgid depending on the user you run it as. You may also need to alter the
env
lines for your paths.