Systemd Unit Files

To have the quadlogSCADA start on system boot, create the systemd unit files for both IOServer and WebServer.

For further information on systemd until files: https://www.freedesktop.org/software/systemd/man/systemd.exec.html

IOServer Unit File

$ nano /lib/systemd/system/ql-ioserver.service
[Unit]
Description=QuadlogSCADA IOServer
After=multi-user.target

[Service]
User=quadlog

Type=idle
WorkingDirectory=/home/quadlog/quadlog-scada/quadlog_scada/ioserver
ExecStart=/home/quadlog/quadlog-scada/.venv/bin/python /home/quadlog/quadlog-scada/quadlog_scada/ioserver/io_server.py

Restart=always
RestartSec=60

#ProtectSystem=full

[Install]
WantedBy=multi-user.target

Change the permissions on the configuration file to 644:

$ chmod 644 /lib/systemd/system/ql-ioserver.service

Make systemd start the process on system start.

$ systemctl daemon-reload
$ systemctl enable ql-ioserver.service
$ systemctl status ql-ioserver.service

WebServer Unit File

$ nano /lib/systemd/system/ql-webserver.service
[Unit]
Description=QuadlogSCADA HTTP-Server
After=multi-user.target

[Service]
User=quadlog

Type=idle
WorkingDirectory=/home/quadlog/quadlog-scada/quadlog_scada/webserver
ExecStart=/home/quadlog/quadlog-scada/.venv/bin/python /home/quadlog/quadlog-scada/quadlog_scada/webserver/web_server.py

Restart=always
RestartSec=10

#ProtectSystem=full

[Install]
WantedBy=multi-user.target

Change the permissions on the configuration file to 644:

$ chmod 644 /lib/systemd/system/ql-webserver.service

Make systemd start the process on system start.

$ systemctl daemon-reload
$ systemctl enable ql-webserver.service
$ systemctl status ql-webserver.service