diff options
author | coderick14 | 2017-06-30 01:46:38 +0530 |
---|---|---|
committer | coderick14 | 2017-06-30 01:46:38 +0530 |
commit | 7775687c0f344ce0657ffcc2fa1bfafeff681e1d (patch) | |
tree | 74320f26f50a44a4c3620ed19847830f21501193 | |
parent | 55c22cbfae65a242dcdf904981f5679e82458387 (diff) | |
download | SBHS-2018-Rpi-7775687c0f344ce0657ffcc2fa1bfafeff681e1d.tar.gz SBHS-2018-Rpi-7775687c0f344ce0657ffcc2fa1bfafeff681e1d.tar.bz2 SBHS-2018-Rpi-7775687c0f344ce0657ffcc2fa1bfafeff681e1d.zip |
Add script to sync time between RPis and server
-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 |