Skip to content

Instantly share code, notes, and snippets.

@r7vme
Created July 9, 2018 19:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save r7vme/9159c52ec72660d8ace02793a5cee788 to your computer and use it in GitHub Desktop.
Save r7vme/9159c52ec72660d8ace02793a5cee788 to your computer and use it in GitHub Desktop.
systemd unit for donkey car
# Allows to automatically start donkey car on boot.
#
# 1. Put contents to /etc/systemd/system/donkey.service
# 2. sudo systemctl daemon-reload
# 3. sudo systemctl start donkey
# 4. sudo journactl -u donkey
#
# TIP: Grab logs via ssh with
#
# ssh pi@d2.local "sudo journalctl -u donkey -f"
#
[Unit]
Description=Donkey car
[Service]
Restart=always
ExecStart=/bin/su - pi bash -c "python -u d2/manage.py drive --model /home/pi/d2/models/mypilot"
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment