Starting OpenESB as a service with systemd

The following is a sample for OpenESB service with systemd. We assume that

  • The service is called openesb

  • The path to OpenESB is /opt/openesb-3.1.2/OE-Instance

  • The path to the JDK is /etc/alternatives/jre

Please modify all the above as appropriate. First let’s create the service by typing the following command

1 sudo nano /etc/systemd/system/openesb.service

The content of the file should be as follow

1 2 3 4 5 6 7 8 9 10 11 12 13 14 [Unit] Description=OpenESB Standalone Service After=network.target httpd.service [Service] Type=simple User=openesb LimitNOFILE=65536 Environment=JAVA_HOME=/etc/alternatives/jre ExecStart=/opt/openesb-3.1.2/OE-Instance/bin/openesb.sh ExecStop=/opt/openesb-3.1.2/OE-Instance/bin/openesb.sh stop [Install] WantedBy=multi-user.target

To start OpenESB type the following

1 sudo systemctl start openesb

Once you assert it is working type you can stop it if needs be by typing the followinf

1 sudo systemctl stop openesb

To enable it after it after reboot

1 sudo systemctl enable openesb