Compare commits

...
Author SHA1 Message Date
MickLesk 79f3dc9a6d Exit 64 when a required setting is missing
newt, forgejo-runner, spacebot and alpine-borgbackup-server stopped with
1 when an unattended install lacked a value it needs, which reports as a
general error; 64 is the code for a missing or invalid input, as
twingate-connector and nextdns already use.
2026-11-28 15:13:04 +01:00
5 changed files with 9 additions and 9 deletions

No files matched your search

+2 -2
View File
@@ -54,12 +54,12 @@ function update_script() {
if [[ -z "$SSH_PUBLIC_KEY" ]]; then
msg_error "No SSH public key provided!"
exit 1
exit 64
fi
if [[ ! "$SSH_PUBLIC_KEY" =~ ^(ssh-rsa|ssh-dss|ssh-ed25519|ecdsa-sha2-) ]]; then
msg_error "Invalid SSH public key format!"
exit 1
exit 64
fi
msg_info "Setting up SSH access"
+3 -3
View File
@@ -64,15 +64,15 @@ function update_script() {
if [[ -n "${mode:-}" ]]; then
if [[ -z "${var_forgejo_instance:-}" ]]; then
msg_error "var_forgejo_instance is required for unattended installs."
exit 1
exit 64
fi
if [[ -z "${var_forgejo_runner_uuid:-}" ]]; then
msg_error "var_forgejo_runner_uuid is required for unattended installs."
exit 1
exit 64
fi
if [[ -z "${var_forgejo_runner_token:-}" ]]; then
msg_error "var_forgejo_runner_token is required for unattended installs."
exit 1
exit 64
fi
fi
+1 -1
View File
@@ -22,7 +22,7 @@ export var_llm_model="${var_llm_model:-}"
if [[ -n "$var_llm_base_url" && -z "$var_llm_model" ]]; then
msg_error "var_llm_model is required with var_llm_base_url."
exit 1
exit 64
fi
header_info "$APP"
+2 -2
View File
@@ -25,7 +25,7 @@ fi
if [[ -z "${var_forgejo_runner_uuid:-}" ]]; then
msg_error "No runner UUID provided. Cannot continue."
exit 1
exit 64
fi
if [[ -z "${var_forgejo_runner_token:-}" ]]; then
@@ -34,7 +34,7 @@ fi
if [[ -z "${var_forgejo_runner_token:-}" ]]; then
msg_error "No runner registration token provided. Cannot continue."
exit 1
exit 64
fi
DEFAULT_RUNNER_LABELS="linux-amd64:docker://node:22-bookworm"
+1 -1
View File
@@ -28,7 +28,7 @@ PANGOLIN_ENDPOINT="${PANGOLIN_ENDPOINT:-${var_newt_endpoint:-}}"
if [[ -z "$NEWT_ID" || -z "$NEWT_SECRET" || -z "$PANGOLIN_ENDPOINT" ]]; then
msg_error "Newt ID, Secret and Endpoint are all required. Aborting."
exit 1
exit 64
fi
msg_info "Configuring Newt"