[Unit] Description=Entrixy WebSocket relay After=network-online.target Wants=network-online.target [Service] Type=simple # The same place the installation steps put the script. WorkingDirectory=/opt/entrixy ExecStart=/usr/bin/python3 /opt/entrixy/entrixy.py # GPIO needs root unless the user is in the gpio group; the script also keeps # its position file next to itself. User=root Restart=always RestartSec=5 # On stop the script switches the relays off itself (SIGTERM handler). KillSignal=SIGTERM TimeoutStopSec=5 [Install] WantedBy=multi-user.target