Add script to copy alpine linux installer and execute it
This commit is contained in:
parent
888a1bbd14
commit
9f3f014a84
1 changed files with 21 additions and 0 deletions
21
copy-tools-and-install.sh
Executable file
21
copy-tools-and-install.sh
Executable file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ $# -ne 4 ]; then
|
||||||
|
echo "$0 host [args for alpine-install-on-disk.sh]"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
host=$1; shift
|
||||||
|
|
||||||
|
disk=$1; shift
|
||||||
|
key=$1; shift
|
||||||
|
mode=$1; shift
|
||||||
|
|
||||||
|
cat <<EOF | ssh -t root@$host
|
||||||
|
echo nameserver 2a0a:e5c0:10:a::a > /etc/resolv.conf
|
||||||
|
apk add git sfdisk sudo util-linux-misc wget
|
||||||
|
cd /opt
|
||||||
|
if [ ! -d /opt/ungleich-tools ]; then git clone https://code.ungleich.ch/ungleich-public/ungleich-tools.git; fi
|
||||||
|
/opt/ungleich-tools/alpine-install-on-disk.sh $disk $key $mode
|
||||||
|
|
||||||
|
EOF
|
Loading…
Reference in a new issue