[Unit] Description=Python Mosquitto_sub waiting for command After=network.target [Service] ExecStart=/usr/bin/python3 /home/krit/OpenWRT/mosq_sub_cmd_v1.py WorkingDirectory=/home/krit/OpenWRT #User=krit # Change this to the user under which the script should run #Group=krit # Change this to the group of the user Restart=always RestartSec=3 #StandardOutput=journal #StandardError=journal #StandardOutput=file:/home/krit/my_script.log #StandardError=file:/home/krit/my_script_error.log [Install] WantedBy=multi-user.target