This repository has been archived on 2025-03-31. You can view files and clone it, but cannot push or open issues or pull requests.
wifi-sd/.wifisd/ntpd.sh
2014-08-12 00:27:35 +02:00

16 lines
433 B
Bash

# https://www.pitt-pladdy.com/blog/_20140202-083815_0000_Transcend_Wi-Fi_SD_Hacks_CF_adaptor_telnet_custom_upload_/
# kill existing ntp daemon
[ -f /var/run/ntpd.pid ] && kill `cat /var/run/ntpd.pid`
# try start a new ntp daemon
if [ -n "$ntpsrv" ]; then
ntpcommand="busybox-extra ntpd"
for ntp in $ntpsrv; do
ntpcommand="$ntpcommand -p $ntp"
done
$ntpcommand
else
busybox-extra ntpd -p pool.ntp.org
fi