Let's make the world a better place using digital technologies!

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

Asif

http://things.m31.ch

View more posts from this author

Leave a Reply

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