Co-authored-by: xiuting.xu <xiutingxt.xu@gmail.com> Reviewed-on: #21 Reviewed-by: huhy <husteryezi@163.com> Reviewed-by: sundapeng <sundp@mail.zgclab.edu.cn> Reviewed-by: yuyr <yuyr@zgclab.edu.cn>
20 lines
825 B
Bash
20 lines
825 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../" && pwd)"
|
|
project_root="$(cd "$root/../../.." && pwd)"
|
|
|
|
source "$project_root/scripts/common/build_user.sh"
|
|
load_build_user
|
|
|
|
# 创建新的private目录结构 (基于argus目录结构)
|
|
echo "[INFO] Creating private directory structure for supervisor-based containers..."
|
|
mkdir -p "$root/private/argus/alert/alertmanager"
|
|
mkdir -p "$root/private/argus/etc/"
|
|
|
|
# 设置数据目录权限
|
|
echo "[INFO] Setting permissions for data directories..."
|
|
chown -R "${ARGUS_BUILD_UID}:${ARGUS_BUILD_GID}" "$root/private/argus/alert/alertmanager" 2>/dev/null || true
|
|
chown -R "${ARGUS_BUILD_UID}:${ARGUS_BUILD_GID}" "$root/private/argus/etc" 2>/dev/null || true
|
|
|
|
echo "[INFO] Supervisor-based containers will manage their own scripts and configurations"
|