|
| 1 | +#!/usr/bin/env bash |
| 2 | +_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func" |
| 3 | +source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func") |
| 4 | + |
| 5 | +# Copyright (c) 2021-2026 community-scripts ORG |
| 6 | +# Author: Nicolas Pastorello (opastorello) |
| 7 | +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE |
| 8 | +# Source: https://victoriametrics.com/products/victorialogs/ |
| 9 | + |
| 10 | +APP="VictoriaLogs" |
| 11 | +var_tags="${var_tags:-logging;monitoring}" |
| 12 | +var_cpu="${var_cpu:-2}" |
| 13 | +var_ram="${var_ram:-2048}" |
| 14 | +var_disk="${var_disk:-10}" |
| 15 | +var_os="${var_os:-debian}" |
| 16 | +var_version="${var_version:-13}" |
| 17 | +var_unprivileged="${var_unprivileged:-1}" |
| 18 | +var_arm64="${var_arm64:-yes}" |
| 19 | + |
| 20 | +header_info "$APP" |
| 21 | +variables |
| 22 | +color |
| 23 | +catch_errors |
| 24 | + |
| 25 | +function update_script() { |
| 26 | + header_info |
| 27 | + check_container_storage |
| 28 | + check_container_resources |
| 29 | + |
| 30 | + if [[ ! -d /opt/victorialogs ]]; then |
| 31 | + msg_error "No ${APP} Installation Found!" |
| 32 | + exit |
| 33 | + fi |
| 34 | + |
| 35 | + if check_for_gh_release "victorialogs" "VictoriaMetrics/VictoriaLogs"; then |
| 36 | + msg_info "Stopping Service" |
| 37 | + systemctl stop victorialogs |
| 38 | + msg_ok "Stopped Service" |
| 39 | + |
| 40 | + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "victorialogs" "VictoriaMetrics/VictoriaLogs" "prebuild" "latest" "/opt/victorialogs" "victoria-logs-linux-$(arch_resolve amd64 arm64)-v*[0-9].tar.gz" |
| 41 | + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "vlutils" "VictoriaMetrics/VictoriaLogs" "prebuild" "latest" "/opt/vlutils" "vlutils-linux-$(arch_resolve amd64 arm64)-v*[0-9].tar.gz" |
| 42 | + |
| 43 | + msg_info "Starting Service" |
| 44 | + systemctl start victorialogs |
| 45 | + msg_ok "Started Service" |
| 46 | + msg_ok "Updated successfully!" |
| 47 | + fi |
| 48 | + exit |
| 49 | +} |
| 50 | + |
| 51 | +start |
| 52 | +build_container |
| 53 | +description |
| 54 | + |
| 55 | +msg_ok "Completed Successfully!\n" |
| 56 | +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" |
| 57 | +echo -e "${INFO}${YW}Access it using the following URL:${CL}" |
| 58 | +echo -e "${GATEWAY}${BGN}http://${IP}:9428${CL}" |
0 commit comments