Summer Nights

A blog on embedded and real-time systems as well as on general computing issues

Creating systemd services for Confluence and Jira

Place the following two files (confluence.service and jira.service) under /etc/systemd/system folder.

confluence.service

[Unit]                                                               
Description=Confluence                                               
After=mysql.service                                                  
                                                                     
[Service]                                                            
Type=forking                                                         
User=confluence                                                      
PIDFile=/opt/atlassian/confluence/work/catalina.pid                  
ExecStart=/opt/atlassian/confluence/bin/start-confluence.sh          
ExecStop=/opt/atlassian/confluence/bin/stop-confluence.sh            
                                                                     
[Install]                                                            
WantedBy=default.target

jira.service

[Unit]                                                                                  
Description=Jira                                                                        
After=network.target ossec.service apache2.service mysql.service confluence.service     
                                                                                        
[Service]                                                                               
Type=forking                                                                            
User=jira                                                                               
PIDFile=/opt/atlassian/jira/work/catalina.pid                                           
ExecStart=/opt/atlassian/jira/bin/start-jira.sh                                         
ExecStop=/opt/atlassian/jira/bin/stop-jira.sh                                           
                                                                                        
[Install]                                                                               
WantedBy=default.target

Enable and start services using the following commands. The services will be enabled on next bootup.

systemctl enable jira.service
systemctl enable confluence.service
systemctl start jira.service
systemctl start confluence.service

Some other useful commands:

systemctl disable jira.service
systemctl daemon-reload

Leave a Reply

Your email address will not be published. Required fields are marked *