#!/bin/bash # Container entrypoint for awg_profiler — Linux Mint image (Dockerfile.mint). # # Identical role to entrypoint.sh (Alpine): the AmneziaWG stack is baked into # the image at build time, so "install-deps" is a no-op here. We seed the # deps-installed flag that init-server / the web setup wizard require, enable # IP forwarding, then hand off to the profiler with whatever command was # passed (defaults to `web`). Split into its own file only because the # seeded os_id/os_version below differ from the Alpine image. set -e : "${AWG_PROFILER_DIR:=/data}" export AWG_PROFILER_DIR mkdir -p "$AWG_PROFILER_DIR" /etc/amnezia/amneziawg # Seed the deps-installed state so init-server doesn't demand `install-deps` # (packages are already present in the image). Written only if absent so it # never clobbers real state on a persistent volume. STATE_FILE="$AWG_PROFILER_DIR/awg_state.json" if [ ! -f "$STATE_FILE" ]; then OS_VERSION="$(. /etc/os-release && echo "$VERSION_ID")" cat > "$STATE_FILE" </dev/null 2>&1 || true exec /usr/local/bin/awg_profiler "$@"