# systemd service file to start relayClient [Unit] Description=MQTT client for switching relays #After=network.target After=mosquitto.service [Service] Type=simple # Run as normal pi user - change to the user name you wish to run relayClient User=mreenen Group=mreenen WorkingDirectory=/home/mreenen/relayClient ExecStart=/home/mreenen/relayClient/relayClient # Use SIGINT to stop KillSignal=SIGINT # Auto restart on crash Restart=on-failure RestartSec=20 # Tag things in the log SyslogIdentifier=relayClient #StandardOutput=syslog [Install] WantedBy=multi-user.target