diff --git a/install/healthchecks-install.sh b/install/healthchecks-install.sh index 8808bff3..222dadce 100644 --- a/install/healthchecks-install.sh +++ b/install/healthchecks-install.sh @@ -50,7 +50,7 @@ $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'" msg_ok "Set up Database" msg_info "Setup healthchecks" -fetch_and_deploy_gh_release "healthchecks/healthchecks" +install_from_gh_release "healthchecks" "healthchecks/healthchecks" "source" cd /opt/healthchecks $STD uv venv .venv $STD source .venv/bin/activate diff --git a/misc/tools.func b/misc/tools.func index be3cc07b..17f75fb1 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -675,6 +675,22 @@ install_mongodb() { msg_ok "MongoDB $MONGO_VERSION installed and started" } +install_from_gh_release() { + local app="$1" + local repo="$2" + local mode="$3" # source|binary + local version="$4" # optional + local deb_name="$5" # optional + + APP="$app" + INSTALL_DIR="/opt/$app" + VERSION="${version:-}" + SOURCE_PACKAGE="${deb_name:-}" + BUILD_SOURCE=$([[ "$mode" == "binary" ]] && echo 0 || echo 1) + + fetch_and_deploy_gh_release "$repo" +} + # ------------------------------------------------------------------------------ # Downloads and deploys latest GitHub release tarball. #