add ensure_docker for addons

This commit is contained in:
MickLesk
2026-08-03 09:25:54 +02:00
parent 34717720d4
commit 0cea54711b
2 changed files with 49 additions and 16 deletions
+2 -16
View File
@@ -67,26 +67,11 @@ function update() {
exit
}
# ==============================================================================
# CHECK DOCKER
# ==============================================================================
function check_docker() {
if ! command -v docker &>/dev/null; then
msg_error "Docker is not installed. This script requires an existing Docker LXC. Exiting."
exit 10
fi
if ! docker compose version &>/dev/null; then
msg_error "Docker Compose plugin is not available. Please install it before running this script. Exiting."
exit 10
fi
msg_ok "Docker $(docker --version | cut -d' ' -f3 | tr -d ',') and Docker Compose are available"
}
# ==============================================================================
# INSTALL
# ==============================================================================
function install() {
check_docker
ensure_docker
msg_info "Creating install directory"
mkdir -p "$INSTALL_PATH"
@@ -163,6 +148,7 @@ if [[ "${type:-}" == "update" ]]; then
fi
header_info
confirm_not_pve_host
get_lxc_ip
# Check if already installed