Developing note
麥克斯從事軟/韌體開發的筆記.
Monday, January 7, 2013
Workaround: NTP behind proxy
#!/bin/bash
PATH="https://ntp-a1.nict.go.jp/cgi-bin/time"
echo Get date from "$PATH"
# Shell will execute /usr/bin/curl $PATH,
# then printed by echo
NOW="`/usr/bin/curl $PATH`"
echo $NOW
# Update system date time
/usr/bin/sudo date --set="$NOW"
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)