How to start Endevor B4G as a service on Linux
search cancel

How to start Endevor B4G as a service on Linux

book

Article ID: 230692

calendar_today

Updated On:

Products

Endevor

Issue/Introduction

Rather than issuing "java -jar <bridgeforgit>.jar" manually every time server is brought up,  it would be nice to start it as a service automatically at server boot/start.

How to configure it?

 

 

Environment

Release : 18.1

Component : BRIDGE FOR GIT 2.9.0

Resolution

Using systemd:

  • Create a shell script to start B4G (for example /home/B4G.sh)
    #!/bin/sh
    java -jar <bridgeforgit>.jar
  • Create B4G.service file under /etc/systemd/system, here is the example:

[Unit]
Description=Reboot B4G systemd service.

[Service]
Type=simple
ExecStart=/bin/bash /home/B4G.sh

[Install]
WantedBy=multi-user.target

  • $ chmod 644 /etc/systemd/system/B4G.service
    $ systemctl enable B4G.service

This will allow B4G service to run (execute B4G.sh and start B4G automatically) after system reboots.