diff options
-rw-r--r-- | synctime.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/synctime.sh b/synctime.sh new file mode 100644 index 0000000..725461a --- /dev/null +++ b/synctime.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Synchronize Raspberry Pi server time with master server +# This script should be run whenever an RPi reboots + +cd sbhs_server/RPi_data + +for ip in $(cat ipaddrs.txt) +do + echo $ip + ssh pi@$ip "sudo date --set \"$(date)\"" +done |