Create systemd service for Resilient Circuits
Creating a systemd service file to make Resilient Circuits runs automatically.
Author(s): Tamas Bures | Created: 16 April 2019 | Last modified: 21 December 2024
Tested on: -
Create systemd service for Resilient Circuits
-
Create a file called
resilient-circuits.service
as root user at/etc/systemd/system
path.touch /etc/systemd/system/resilient-circuits.service
-
Add the following content and adjust the obvious values to match your environment:
[Unit] Description=IBM Resilient-Circuits Service After=network.target [Service] Type=simple User=resilient WorkingDirectory=/home/resilient ExecStart=/usr/local/bin/resilient-circuits run Restart=always TimeoutSec=10 Environment=APP_CONFIG_FILE=/home/resilient/.resilient/app.config Environment=APP_LOCK_FILE=/home/resilient/.resilient/resilient_circuits_lockfile [Install] WantedBy=multi-user.target
If you run Resilient Circuits on Resilient appliance, you must add the following to options to the
[Unit]
section:After=resilient.service Requires=resilient.service
For example:
[Unit] Description=IBM Resilient-Circuits Service After=resilient.service Requires=resilient.service [Service] Type=simple User=resilient WorkingDirectory=/home/resilient ExecStart=/usr/local/bin/resilient-circuits run Restart=always TimeoutSec=10 Environment=APP_CONFIG_FILE=/home/resilient/.resilient/app.config Environment=APP_LOCK_FILE=/home/resilient/.resilient/resilient_circuits_lockfile [Install] WantedBy=multi-user.target
-
Save the file.
-
Enable the service:
systemctl enable resilient-circuits.service
-
Start the service:
systemctl start resilient-circuits.service
-
Check service status:
systemctl status resilient-circuits.service