Browse Source

Configurable time sources

Bob Mottram 11 years ago
parent
commit
3595eac7ee
1 changed files with 12 additions and 2 deletions
  1. 12
    2
      install-freedombone.sh

+ 12
- 2
install-freedombone.sh View File

83
 
83
 
84
 SSH_PORT=2222
84
 SSH_PORT=2222
85
 
85
 
86
+# Why use Google as a time source?
87
+# The thinking here is that it's likely to be reliable and fast.
88
+# The ping doesn't reveal any information other than that the server
89
+# is running, and if anyone maliciously alters the time on Google's
90
+# servers then that would certainly be newsworthy and they'd be
91
+# likely to do something about it quickly.
92
+# If you have better time sources then change them here.
93
+TLS_TIME_SOURCE1="google.com"
94
+TLS_TIME_SOURCE2="www.ptb.de"
95
+
86
 # kernel specifically tweaked for the Beaglebone Black
96
 # kernel specifically tweaked for the Beaglebone Black
87
 KERNEL_VERSION="v3.15.10-bone7"
97
 KERNEL_VERSION="v3.15.10-bone7"
88
 
98
 
1329
   apt-get -y remove ntpdate
1339
   apt-get -y remove ntpdate
1330
 
1340
 
1331
   echo '#!/bin/bash' > /usr/bin/updatedate
1341
   echo '#!/bin/bash' > /usr/bin/updatedate
1332
-  echo 'TIMESOURCE=google.com' >> /usr/bin/updatedate
1333
-  echo 'TIMESOURCE2=www.ptb.de' >> /usr/bin/updatedate
1342
+  echo "TIMESOURCE='TLS_TIME_SOURCE1'" >> /usr/bin/updatedate
1343
+  echo "TIMESOURCE2='TLS_TIME_SOURCE2'" >> /usr/bin/updatedate
1334
   echo 'LOGFILE=/var/log/tlsdate.log' >> /usr/bin/updatedate
1344
   echo 'LOGFILE=/var/log/tlsdate.log' >> /usr/bin/updatedate
1335
   echo 'TIMEOUT=5' >> /usr/bin/updatedate
1345
   echo 'TIMEOUT=5' >> /usr/bin/updatedate
1336
   echo "EMAIL=$MY_USERNAME@$DOMAIN_NAME" >> /usr/bin/updatedate
1346
   echo "EMAIL=$MY_USERNAME@$DOMAIN_NAME" >> /usr/bin/updatedate