Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2017
451
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. pi@raspberrypi.local:~ $ cat /lib/systemd/system/clockapp.service
  2. [Unit]
  3. Description=Clock Application
  4. After=network.target
  5.  
  6. [Service]
  7. ExecStart=/usr/bin/python /opt/clock/Clock.py
  8. Type=simple
  9. User=pi
  10. Group=pi
  11. Restart=on-failure
  12. RestartSec=5
  13. StartLimitInterval=60s
  14. StartLimitBurst=3
  15.  
  16. [Install]
  17. WantedBy=multi-user.target
  18.  
  19.  
  20. # ask systemd to reload so it picks up the changes we made
  21. pi@raspberrypi.local:~ $ sudo systemctl daemon-reload
  22.  
  23. # enable my service so it starts on boot
  24. pi@raspberrypi.local:~ $ sudo systemctl enable clockapp.service
  25.  
  26. # and start it now
  27. pi@raspberrypi.local:~ $ sudo systemctl start clockapp.service
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement