Skip to content

Instantly share code, notes, and snippets.

@NightyKnight
Created April 9, 2020 13:43
Show Gist options
  • Select an option

  • Save NightyKnight/08225633bccc2f910e7b3943295aba88 to your computer and use it in GitHub Desktop.

Select an option

Save NightyKnight/08225633bccc2f910e7b3943295aba88 to your computer and use it in GitHub Desktop.
Fisheye/Crucible Systemd Service CentOS 7
########################################################################################################################################
# I found the documentation on Atlassian's website to be lacking so I thought I would save my findings.
# Feel free to remove any comment from my code as they are only there to guide others like myself who struggled to get this working.
#Start Fisheye as a service
#This should create the file if it does not exist
sudo vi /usr/lib/systemd/system/fisheye.service
# Copy the below into the fisheye.service file and adjust the paths to where your install is located. I also added the postgresql-9.6.service
# as a dependency since fisheye needs the database running before starting. I also created the fisheye user and gave it ownership of the
# fisheye instance and install directories. This method is the recommended and secure method to run the application. You may also need to
# adjust your JAVA_HOME to reflect where you have a JRE installed. I had to add the environment variables into the service in order for
# Fisheye to register the proper paths. You can check on linux when the service is running by running "ps aux | grep java". This will
# give you the Java process path and options currently in use. The FISHEYE_OPS item increases the Java heap space which you may
# not need.
[Unit]
Description=Fisheye the on-premise source code repository browser for enterprise teams
After=syslog.target network.target postgresql-9.6.service
[Service]
Type=forking
User=fisheye
Environment=JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-0.el7_7.x86_64/jre
Environment=FISHEYE_INST=/app/atlassian/fisheyecrucible-data
Environment=FISHEYE_OPTS=-Xmx2048m
ExecStart=/app/atlassian/fecru-4.6.0/bin/fisheyectl.sh start
ExecStop=/app/atlassian/fecru-4.6.0/bin/fisheyectl.sh stop
[Install]
WantedBy=multi-user.target
#Reload the systemd daemon
sudo systemctl daemon-reload
#Allow service to startup automatically on reboot
sudo systemctl enable fisheye.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment