comparison workers/bin/installInTemplate.sh @ 23:cc065b2a2543

more tweaks wrt getting H4 going
author Henry S. Thompson <ht@markup.co.uk>
date Wed, 31 Oct 2018 21:42:34 +0000
parents 9631fca89cc6
children db75ec542c66
comparison
equal deleted inserted replaced
22:60d4042dab26 23:cc065b2a2543
1 #!/bin/bash 1 #!/bin/bash
2 sudo mkdir /var/data
3 sudo mount -t tmpfs -o size=8g tmpfs /var/data
4 sudo chmod og+w /var/data
2 sudo apt-get -y install python3 parallel psmisc jq mercurial curl 5 sudo apt-get -y install python3 parallel psmisc jq mercurial curl
3 curl -L https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - 6 curl -L https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
4 echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ jessie main" |\ 7 echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ jessie main" |\
5 sudo tee /etc/apt/sources.list.d/azure-cli.list 8 sudo tee /etc/apt/sources.list.d/azure-cli.list
6 sudo apt-get -y --force-yes install apt-transport-https 9 sudo apt-get -y --force-yes install apt-transport-https
7 sudo apt-get -y update 10 sudo apt-get -y update
8 sudo apt-get -y install azure-cli 11 sudo apt-get -y install azure-cli
9 sudo adduser --disabled-password -GECOS "CC master" cc
10 if [ ! -d ~cc/.ssh ] 12 if [ ! -d ~cc/.ssh ]
11 then 13 then
14 if [ ! -d ~cc ]
15 then
16 sudo adduser --disabled-password --GECOS "CC master" cc
17 fi
12 sudo su -c 'ssh-keygen -t rsa -N "" -f /home/cc/.ssh/id_rsa' cc 18 sudo su -c 'ssh-keygen -t rsa -N "" -f /home/cc/.ssh/id_rsa' cc
19 echo "$1" >> /home/cc/.ssh/authorized_keys
20 sudo su -c 'mkdir bin' cc
21 sudo su -c 'sed "5i # Unless login (in which case .profile will have done this), add ~/bin to PATH\
22 case $- in\
23 *l*) ;;\
24 *) export PATH=/home/cc/bin:$PATH ;;\
25 esac\
26 "' cc
13 fi 27 fi
14 sudo cat ~cc/.ssh/id_rsa.pub 28 sudo cat ~cc/.ssh/id_rsa.pub