Created
February 19, 2013 09:42
-
-
Save hnnesv/4984437 to your computer and use it in GitHub Desktop.
Tool for HIMMS Showcase 2013 - Set the system clock via watch.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: run this script using the watch command; e.g. | |
# sudo watch ./setclock.sh | |
if [ -f "/tmp/clockset" ]; then | |
echo "Setting date"; | |
date `cat /tmp/clockset`; | |
rm -f /tmp/clockset; | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We need to update this to restart the ntp service else ntpd get confused!