aboutsummaryrefslogtreecommitdiffstats
path: root/build-hcloud-snapshot.sh
diff options
context:
space:
mode:
authorEugene Triguba <hello@eugenetriguba.com>2026-09-23 15:11:58 -0700
committerEugene Triguba <hello@eugenetriguba.com>2026-10-11 18:33:35 -0700
commit75892026b595f8c5b6b59cf8cafee8d2a54e10f7 (patch)
treee1735764a333da2dd572b3f20aec55bc27690cb0 /build-hcloud-snapshot.sh
parentAdd labels to hcloud snapshot (diff)
downloadsite-server-images-75892026b595f8c5b6b59cf8cafee8d2a54e10f7.zip
Fix SSH key and use multiple cpus during the build
The SSH key variable being referenced was incorrect, so we had a syntax error. Furthermore, we need to use multiple CPUs during the image build since if we only use 1 CPU, OpenBSD will use the GENERIC kernel rather than the GENERIC.MP kernel, which means we'll only be able to use 1 CPU.
Diffstat (limited to 'build-hcloud-snapshot.sh')
-rwxr-xr-xbuild-hcloud-snapshot.sh12
1 files changed, 4 insertions, 8 deletions
diff --git a/build-hcloud-snapshot.sh b/build-hcloud-snapshot.sh
index 40f3dcb..00ec32d 100755
--- a/build-hcloud-snapshot.sh
+++ b/build-hcloud-snapshot.sh
@@ -16,7 +16,7 @@ SCRIPTDIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)
VERSION=7.9
ARCH=amd64
-PUBLIC_SSH_KEY="$HOME/.ssh/id_rsa.pub"
+SSH_KEY="default-key"
main() (
parse_args "$@"
@@ -29,7 +29,7 @@ main() (
-var "image_path=${img_path}.zst" \
-var "version=$VERSION" \
-var "arch=$ARCH" \
- -var "ssh_key=$(get_ssh_key_name "$PUBLIC_SSH_KEY")" \
+ -var "ssh_key=$SSH_KEY" \
.
)
@@ -44,8 +44,8 @@ parse_args() {
ARCH="$2"
shift 2
;;
- --public-ssh-key)
- PUBLIC_SSH_KEY="$2"
+ --ssh-key)
+ SSH_KEY="$2"
shift 2
;;
*)
@@ -62,8 +62,4 @@ build_compressed_image() (
fi
)
-get_ssh_key_name() {
- awk '{print $3}' "$1"
-}
-
main "$@"