forked from amamory/tutos
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a script to perform the manual update
- Loading branch information
1 parent
f5738b3
commit df34325
Showing
2 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
# This script updates the clock of the Jetson by checking the server | ||
# located in ``IP`` machine. The server must be broadcasting NTP in | ||
# the connected network. In order to configure NTP server and client, | ||
# please check | ||
# http://platypus-boats.readthedocs.io/en/latest/source/jetson/peripheral/network.html#syncronizing-clocks-in-jetson-tk1 | ||
# | ||
|
||
if [[ $# -ne 1 ]]; then | ||
echo "ERROR: update clock by passing the IP of the server" | ||
echo "./update_clock.sh 192.168.2.185" | ||
elif [[ $1 =~ ^[0-9]+\.[0-9]+\.+[0-9]+\.[0-9]+$ ]]; then | ||
sudo service ntp stop | ||
sudo ntpd -s $1 | ||
sudo service ntp start | ||
else | ||
echo "ERROR: $1 is not a valid IP address" | ||
fi |