diff --git a/install.sh b/install.sh index 7c957b3..804bde6 100755 --- a/install.sh +++ b/install.sh @@ -42,7 +42,7 @@ blank() { printf '\n' >&2; } good() { out " ${GREEN}${OK}${R} $*"; } note() { out " ${D}$*${R}"; } warn() { out " ${AMBER}!${R} $*"; } -die() { blank; out " ${RED}${NO}${R} ${B}$*${R}"; blank; exit 1; } +die() { blank; out " ${RED}${NO}${R} ${B}$1${R}"; shift; for more in "$@"; do out " $more"; done; blank; exit 1; } rule() { out "${D}${HR}${R}"; } step() { blank; out "${AMBER}${B}$1${R} ${B}$2${R}"; [ -z "${3:-}" ] || note "$3"; blank; } @@ -302,7 +302,7 @@ if [ -f "$tmp/SHA256SUMS" ] && command -v sha256sum >/dev/null 2>&1; then want=$(awk -v f="$file" '$2 == f || $2 == "*" f { print $1 }' "$tmp/SHA256SUMS") got=$(sha256sum "$tmp/hamlab" | awk '{ print $1 }') [ -n "$want" ] || die "SHA256SUMS has no entry for $file." - [ "$want" = "$got" ] || die "Checksum mismatch for $file: this is not the file that was published. Nothing was installed." + [ "$want" = "$got" ] || die "Checksum mismatch for $file." "This is not the file that was published. Nothing was installed." good "checksum matches SHA256SUMS" else warn "no SHA256SUMS (or no sha256sum here): the download was not verified" @@ -344,7 +344,7 @@ out " ${GREEN}${B}${OK} Ham Lab $("$hamlab_bin" version 2>/dev/null | awk '{ pr blank row() { out " $(printf '%-10s' "$1") $2"; [ -z "${3:-}" ] || out " ${D}$3${R}"; } if [ "$init" = none ]; then - row "start it" "${B}hamlab serve${R}" "as ${run_as:-its user}, under your own supervisor: nothing here starts it at boot" + row "start it" "${B}hamlab serve${R}" "as ${run_as:-its user}, under your own supervisor: nothing starts it at boot" fi if [ -n "$listen" ]; then row "open" "${CYAN}${B}$scheme://$(printf '%s' "$listen" | sed "s/^0\.0\.0\.0/$url_host/")${R}" diff --git a/internal/setup/setup.go b/internal/setup/setup.go index 8e73451..d078419 100644 --- a/internal/setup/setup.go +++ b/internal/setup/setup.go @@ -249,7 +249,7 @@ func Install(args []string, version string) error { url := scheme + "://" + browseAddr(cfg.Listen) switch { case initSys == "": - say("\nNo systemd or OpenRC here, so nothing starts it at boot. Run it under your supervisor as %s:\n HAMLAB_CONFIG=%s %s serve", acct.name, cfgPath, dest) + say("\nNo systemd or OpenRC here, so nothing starts it at boot.\nRun it under your own supervisor, as %s:\n HAMLAB_CONFIG=%s %s serve", acct.name, cfgPath, dest) case o.noStart: case healthy(cfg.Listen, cfg.TLS == "auto"): say("\nHam Lab is up: %s", url)