Skip to content

Instantly share code, notes, and snippets.

@brettbeeson
Created February 16, 2020 08:58
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 brettbeeson/ed6799df73a885da58a3df564a40a05e to your computer and use it in GitHub Desktop.
Save brettbeeson/ed6799df73a885da58a3df564a40a05e to your computer and use it in GitHub Desktop.
A systemd service to sync to (PiJuice Zero's) a Real Time Clock upon boot.
[Unit]
Description=Sync pi to PjJuice hardware RTC
[Service]
ExecStart=/sbin/hwclock -s
# This might be optional, as default user is root(?)
User=root
Group=root
[Install]
WantedBy=multi-user.target
# sudo edit /etc/systemd/sync-to-rtc.service
# sudo enable /etc/systemd/sync-to-rtc.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment