]> rtime.felk.cvut.cz Git - can-benchmark.git/commitdiff
Poweroff the test box after the cron job finishes
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 5 Dec 2014 09:35:48 +0000 (10:35 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 5 Dec 2014 09:35:48 +0000 (10:35 +0100)
The box makes annoying high frequency noise :-(

continuous/cron.sh

index 97243b46e3b5c2842708c1c6b49ecf92ae66e061..6b951aab7699cac763f037c25b7ba8f5f678f02a 100755 (executable)
@@ -6,6 +6,11 @@ set -e
 
 cd $(dirname $0)
 
+# Wakeup glab
+sudo /usr/sbin/etherwake 00:0c:f1:77:ec:46
+while ! ssh sojka@glab true; do sleep 1; done
+sleep 30 # Wait a bit to finish all boot jobs etc.
+
 mkdir -p logs
 
 NOW=$(date +%F_%R:%S)
@@ -19,3 +24,5 @@ fi
 make -C www --silent publish
 
 ( cd logs && git add $LOG && git commit --quiet -m 'Automatic commit' && git push --quiet )
+
+ssh -f sojka@glab 'sudo /sbin/poweroff