Thanks @Sylvain Guilbaud, very nice article!

May I suggest that instead of hardcoding the instance name, you can also use a systemd template and pass the instance name as an argument. This way you can reuse the service for multiple IRIS installations on the same host.

IRIS_MGR_USER="irisusr"

cat << EOF | sudo tee /etc/systemd/system/iris@.service > /dev/null
[Unit]
Description=InterSystems IRIS Data Platform
After=network.target

[Service]
Type=forking
User=$IRIS_MGR_USER
ExecStart=/usr/bin/iris start %i
ExecStop=/usr/bin/iris stop %i quietly
Restart=on-failure
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target
EOF



sudo systemctl daemon-reload

sudo systemctl enable iris@IRIS.service

sudo systemctl start iris@IRIS.service