mirror of
https://github.com/GrapheneOS/infrastructure.git
synced 2025-05-11 19:25:04 -04:00
simplify deployment script usage
This commit is contained in:
parent
750cd5e985
commit
d103f6cdf3
3 changed files with 66 additions and 7 deletions
|
@ -3,10 +3,18 @@
|
|||
set -o errexit -o nounset -o pipefail
|
||||
|
||||
. hosts.sh
|
||||
. deploy.sh
|
||||
|
||||
[[ $# -eq 1 ]] || exit 1
|
||||
|
||||
readonly host=$1
|
||||
readonly ip=${hosts_ipv4_address[$host]}
|
||||
readonly hostname=${hosts_hostname[$host]}
|
||||
readonly agcount=${hosts_agcount[$host]:-4}
|
||||
readonly swap=${hosts_agcount[$host]:-2048}
|
||||
readonly remote=root@$ip
|
||||
|
||||
readonly drive=$(ssh $remote '[[ -e /dev/sda ]] && echo sda || echo vda')
|
||||
|
||||
# check for Arch ISO
|
||||
ssh $remote '[[ $(grep IMAGE_ID /etc/os-release) = "IMAGE_ID=archlinux" ]]' || exit 5
|
||||
ssh $remote '[[ $(grep IMAGE_VERSION /etc/os-release) = "IMAGE_VERSION=2024.06.01" ]]' || exit 5
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue