diff master/bin/setupTemplate.sh @ 4:56d8823c68e0

pretty much complete...
author Henry S. Thompson <ht@markup.co.uk>
date Fri, 28 Sep 2018 15:18:07 +0000
parents
children 580221a17890
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/master/bin/setupTemplate.sh	Fri Sep 28 15:18:07 2018 +0000
@@ -0,0 +1,6 @@
+#!/usr/bin/bash
+ip=$1
+ssh -o StrictHostKeyChecking=no $ip </var/cc/workers/bin/setupTemplate.sh
+ssh $ip "sudo su -c 'cd ~/.ssh && cat >authorized_keys' cc" < /var/cc/ak
+ssh $ip </var/cc/workers/bin/installInTemplate.sh | tee /dev/stderr | tail -1 | sudo tee -a ~cc/.ssh/authorized_keys >/dev/null 
+( cd ~ && tar -czf - .azure ) | ssh cc@$ip "tar -xzf -"