Run ORDS as a systemd Service
In this example, I configure ORDS to run as a systemd service. This way ORDS runs in the background and will start at boot time.
I installed and configured ORDS in /opt/ords/ords20.
4, and verified that it runs in standalone mode on ports 80 and 443.
To configure the service, create a unit file ords.service in /etc/systemd/service:
[Unit]
Description=ORDS Service
[Service]
User=root
WorkingDirectory=/opt/ords/ords20.4
SyslogIdentifier=ords
Restart=always
RestartSec=30
TimeoutStartSec=30
TimeoutStopSec=30
ExecStart=/usr/bin/java "-Dorg.eclipse.jetty.server.Request.maxFormContentSize=3000000" -jar ords.war standalone
ExecStop=kill $(ps -ef | grep "ords.war" | grep -v grep| awk '{print $2}')
[Install]
WantedBy=multi-user.target
Make sure to edit any paths and options as necessary.
To enable and start the service use
systemctl enable ords
systemctl start ords
You can follow the ORDS log with journalctl:
journalctl -f -u ords.service
To check the status or stop the service use:
systemctl status ords
systemctl stop ords
Enjoy!