Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pi@raspberrypi.local:~ $ cat /lib/systemd/system/clockapp.service
- [Unit]
- Description=Clock Application
- After=network.target
- [Service]
- ExecStart=/usr/bin/python /opt/clock/Clock.py
- Type=simple
- User=pi
- Group=pi
- Restart=on-failure
- RestartSec=5
- StartLimitInterval=60s
- StartLimitBurst=3
- [Install]
- WantedBy=multi-user.target
- # ask systemd to reload so it picks up the changes we made
- pi@raspberrypi.local:~ $ sudo systemctl daemon-reload
- # enable my service so it starts on boot
- pi@raspberrypi.local:~ $ sudo systemctl enable clockapp.service
- # and start it now
- pi@raspberrypi.local:~ $ sudo systemctl start clockapp.service
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement