[Unit]
Description=OpenSCADA PLC
After=network.target

[Service]
Type=simple
User=root
PIDFile=/var/run/openscada_PLC.pid
ExecStart=/usr/bin/openscada --projName=plc --projUserDir --demon --pidFile=/var/run/openscada_PLC.pid
Restart=always
RestartSec=5
StandardOutput=append:/var/log/openscada.log
StandardError=append:/var/log/openscada.log

# As --retry=TERM/30/KILL/5 in the init script
KillSignal=SIGTERM
TimeoutStopSec=30s
KillMode=mixed

[Install]
WantedBy=multi-user.target
