Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/chronotron.service
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Description=Display chrony statistics on 4x20 LCD
After=network.target

//If in 1 min fail more then 5 times, stop restart service.
StartLimitIntervalSec=60s
StartLimitBurst=5


[Service]
Type=simple
User=root
Expand All @@ -10,6 +15,9 @@ WorkingDirectory=/opt/chronotron
ExecStart=/opt/chronotron/chronotron.py
StandardOutput=syslog
StandardError=syslog
//If service fail, auto restart after 5 sec
Restart=on-failure
RestartSec=5s

[Install]
WantedBy=multi-user.target