#!/bin/sh # Installs WPHoster on a fresh Debian 12/13 or Ubuntu 24.04/26.04 server: curl -sSfL https://wphoster.io/install.sh | sudo sh # Downloads the latest release (the binary and its install.sh) from GitHub, checks it, and runs it. Safe to re-run: it # upgrades. After that the panel keeps itself up to date (Update Preferences). # Everything sits in main(), called on the last line, so a cut-off download runs nothing. set -eu main() { [ "$(id -u)" = 0 ] || { echo "Run it as root: curl -sSfL https://wphoster.io/install.sh | sudo sh" >&2; exit 1; } . /etc/os-release case "$ID $VERSION_ID" in "debian 12" | "debian 13" | "ubuntu 24.04" | "ubuntu 26.04") ;; *) echo "WPHoster runs on Debian 12 or 13, or Ubuntu 24.04 or 26.04; this is $PRETTY_NAME." >&2; exit 1 ;; esac [ "$(uname -m)" = x86_64 ] || { echo "WPHoster runs on x86_64; this is $(uname -m)." >&2; exit 1; } tmp=$(mktemp -d) trap 'rm -rf "$tmp"' EXIT cd "$tmp" echo "Downloading WPHoster..." # The latest release CI published (the panel updates itself from there too, checking its signature). rel=https://github.com/dcswalle/wphoster-releases/releases/latest/download curl -sSfLO $rel/wphoster-x86_64.tar.gz || { echo "No release to download yet." >&2; exit 1; } curl -sSfLO $rel/wphoster-x86_64.tar.gz.sha256 sha256sum -c --quiet wphoster-x86_64.tar.gz.sha256 tar -xzf wphoster-x86_64.tar.gz ./install.sh ./wphoster