Compare commits

..
Author SHA1 Message Date
github-actions[bot] 2a59f4e2de Update CHANGELOG.md 2026-12-06 11:00:26 +00:00
CanbiZ (MickLesk) ba62bc3882 Hermes Agent: serve the Webapp from the gateway instead of hermes dashboard (#19322)
* Hermes Agent: serve the Webapp from the gateway instead of hermes dashboard

hermes dashboard is deprecated. New installs set up the gateway as a user
service with the Webapp on 127.0.0.1:9119; updates move an existing
dashboard there with hermes gateway migrate --backends, which keeps the
address and can be undone with --restore.

* Update hermesagent-install.sh
2026-12-06 12:00:09 +01:00
CanbiZ (MickLesk) c0d06f46e6 Immich: unpack the base image without restoring its owners (#19323)
A container whose idmap leaves out uid 1000 (a common bind-mount setup)
failed the unpack with "lchown /home/node: invalid argument" and was told
it needs Proxmox VE 9.1. Only /usr/local is used, which is root-owned
either way.
2026-12-06 11:34:39 +01:00
CanbiZ (MickLesk) a9845be53d MusicGrabber: install the FLAC Verifier from its release binary (#19320)
* MusicGrabber: install the FLAC Verifier from its release binary

MusicGrabber 4.7.1 replaced the Python engine with a static binary, so the
commit the scripts read from the Dockerfile is gone and every install and
update has ended in a 404 since. The version now comes from the release URL
in the Dockerfile, and a Dockerfile without one only leaves the check off.

An update also runs when the service is stopped: that is the state the
failed update left behind, with the stamp already at the new version.

* fix update check

Remove commented line about stopped service.

* MusicGrabber: read Python and the packages from upstream's Dockerfile

The pins in the scripts were a copy of the Dockerfile and went stale with
every release: upstream is on Python 3.15, apprise 2 and PyJWT by now. Both
scripts now read the Python version and the pip packages from the Dockerfile
of the release they deploy.

The update reads them before it stops the service and changes nothing when
the Dockerfile no longer names them. It rebuilds the venv, so dropped
packages and a new Python version arrive as well.
2026-12-06 11:30:17 +01:00
CanbiZ (MickLesk) e3d12fe346 Immich: retry the base image download (#19321)
skopeo gives up on the first failed request. In a week that ended eight
installs: ghcr.io answering 429 with a retry-after of under a millisecond,
DNS and connect timeouts, a dropped connection. --retry-times repeats the
copy for exactly these, after 1, 2 and 4 seconds, and keeps the layers it
already has.
2026-12-06 11:27:49 +01:00
6b202d4ed0 networkoptimizer: build all Go helpers (WAN Steering, AP Agent) (#19285)
Follow upstream docker/NATIVE-DEPLOYMENT.md "Build the Go Helpers": besides
uwnspeedtest, build wansteer (gateway, arm64) and apagent (arm/GOARM=7,
arm64, mipsle, mips softfloat) into publish/tools, and stamp every binary
with main.version so the app can report which build each one runs.

Without them WAN Steering reports "WAN Steering binary not found" and AP
Telemetry deploy fails with "The AP Agent binary for <arch> is not included
in this build."

Co-authored-by: Dave Packham <dpackham@p0larmacm4.thepackhams.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-06 10:32:00 +01:00
11 changed files with 147 additions and 155 deletions

No files matched your search

+15
View File
@@ -600,6 +600,21 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details>
## 2026-12-06
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Immich: unpack the base image without restoring its owners [@MickLesk](https://github.com/MickLesk) ([#19323](https://github.com/community-scripts/ProxmoxVE/pull/19323))
- Immich: retry the base image download [@MickLesk](https://github.com/MickLesk) ([#19321](https://github.com/community-scripts/ProxmoxVE/pull/19321))
- networkoptimizer: build all Go helpers (WAN Steering, AP Agent) [@dpackham](https://github.com/dpackham) ([#19285](https://github.com/community-scripts/ProxmoxVE/pull/19285))
- #### 🔧 Refactor
- Hermes Agent: serve the Webapp from the gateway instead of hermes dashboard [@MickLesk](https://github.com/MickLesk) ([#19322](https://github.com/community-scripts/ProxmoxVE/pull/19322))
- MusicGrabber: install the FLAC Verifier from its release binary [@MickLesk](https://github.com/MickLesk) ([#19320](https://github.com/community-scripts/ProxmoxVE/pull/19320))
## 2026-12-05
### 🚀 Updated Scripts
+22 -2
View File
@@ -76,7 +76,9 @@ EOF
sleep 1
chown -R hermes:hermes /home/hermes || msg_warn "Could not take ownership of everything under /home/hermes"
fi
$STD runuser -l hermes -c 'systemctl --user daemon-reload && systemctl --user enable hermes-dashboard'
if [[ -f /home/hermes/.config/systemd/user/hermes-dashboard.service && ! -f /home/hermes/.hermes/backend_migration.json ]]; then
$STD runuser -l hermes -c 'systemctl --user daemon-reload && systemctl --user enable hermes-dashboard'
fi
NODE_VERSION="22" setup_nodejs
@@ -88,8 +90,26 @@ EOF
msg_ok "Updated Hermes Agent"
msg_info "Starting Services"
$STD runuser -l hermes -c 'systemctl --user start hermes-dashboard'
$STD runuser -l hermes -c '
systemctl --user daemon-reload
if systemctl --user is-enabled -q hermes-dashboard 2>/dev/null; then systemctl --user start hermes-dashboard; fi
if systemctl --user is-enabled -q hermes-gateway 2>/dev/null; then systemctl --user restart hermes-gateway; fi
'
msg_ok "Started Services"
# hermes dashboard is deprecated; upstream moves it onto the gateway's Webapp on the same address.
if [[ -f /home/hermes/.config/systemd/user/hermes-dashboard.service && ! -f /home/hermes/.hermes/backend_migration.json ]]; then
msg_info "Moving the Dashboard to the Gateway's Webapp"
for _ in {1..30}; do
curl -so /dev/null http://127.0.0.1:9119/ && break
sleep 1
done
if $STD runuser -l hermes -c 'set -a; source /etc/default/hermes; set +a; hermes gateway migrate --backends --apply --yes'; then
msg_ok "Moved the Dashboard to the Gateway's Webapp"
else
msg_warn "Could not move the Dashboard to the Gateway's Webapp, it keeps running"
fi
fi
msg_ok "Updated successfully!"
exit
}
+3 -3
View File
@@ -459,14 +459,14 @@ function fetch_prebuilt_libs() {
local oci_dir
oci_dir="$(mktemp -d)"
PREBUILT_BUNDLE="$(mktemp -d)"
if ! $STD skopeo copy --override-os linux --override-arch "$(arch_resolve amd64 arm64)" "docker://${image}" "oci:${oci_dir}:img"; then
if ! $STD skopeo copy --retry-times 3 --override-os linux --override-arch "$(arch_resolve amd64 arm64)" "docker://${image}" "oci:${oci_dir}:img"; then
rm -rf "$oci_dir" "$PREBUILT_BUNDLE"
msg_error "Could not download Immich's base image (${image}). Immich was not updated."
exit 115
fi
if ! $STD umoci unpack --image "${oci_dir}:img" "$PREBUILT_BUNDLE"; then
if ! $STD umoci unpack --rootless --image "${oci_dir}:img" "$PREBUILT_BUNDLE"; then
rm -rf "$oci_dir" "$PREBUILT_BUNDLE"
msg_error "Could not unpack Immich's base image. Immich needs Proxmox VE 9.1 or newer; it was not updated."
msg_error "Could not unpack Immich's base image. Immich was not updated."
exit 105
fi
rm -rf "$oci_dir"
+25 -15
View File
@@ -32,37 +32,47 @@ function update_script() {
fi
RELEASE=$(get_latest_gl_tag "g33kphr33k/musicgrabber" "v*")
if [[ "$RELEASE" == "$(cat ~/.musicgrabber 2>/dev/null)" ]]; then
if [[ "$RELEASE" == "$(cat ~/.musicgrabber 2>/dev/null)" ]] && systemctl is-active -q musicgrabber; then
msg_ok "No update required. ${APP} is already at ${RELEASE}"
exit
fi
DOCKERFILE="$(curl -fsSL "https://gitlab.com/g33kphr33k/musicgrabber/-/raw/${RELEASE}/Dockerfile")"
PYTHON_VERSION="$(grep -oP '^FROM python:\K[0-9]+\.[0-9]+' <<<"$DOCKERFILE" | tail -n1 || true)"
mapfile -t PIP_DEPS < <(awk '{ if (sub(/\\$/, "")) printf "%s ", $0; else print }' <<<"$DOCKERFILE" | sed 's/&&/\n/g' | sed -n -E 's/^(RUN)?[[:space:]]*pip install //p' | tr -d "\"'" | tr -s ' ' '\n' | grep -E '^[A-Za-z0-9][A-Za-z0-9._-]*(\[[A-Za-z0-9,_-]+\])?([~=!<>]=?[^[:space:]]+)?$')
if [[ -z "$PYTHON_VERSION" || ${#PIP_DEPS[@]} -eq 0 ]]; then
msg_error "MusicGrabber ${RELEASE} does not name its Python version and packages in the Dockerfile. Nothing was changed."
exit 250
fi
msg_info "Stopping MusicGrabber"
systemctl stop musicgrabber
msg_ok "Stopped MusicGrabber"
setup_uv
fetch_and_deploy_gh_release "yt-dlp" "yt-dlp/yt-dlp" "singlefile" "latest" "/usr/local/bin" "yt-dlp_$(arch_resolve "linux" "linux_aarch64")"
fetch_and_deploy_gh_release "deno" "denoland/deno" "prebuild" "latest" "/usr/local/bin" "deno-$(arch_resolve "x86_64" "aarch64")-unknown-linux-gnu.zip"
CLEAN_INSTALL=1 CLEAN_INSTALL_KEEP=".venv" fetch_and_deploy_gl_tag "musicgrabber" "g33kphr33k/musicgrabber" "$RELEASE"
CLEAN_INSTALL=1 fetch_and_deploy_gl_tag "musicgrabber" "g33kphr33k/musicgrabber" "$RELEASE"
msg_info "Updating MusicGrabber"
cd /opt/musicgrabber
$STD uv pip install --python .venv/bin/python \
"fastapi~=0.162.0" \
"uvicorn[standard]~=0.54.0" \
"httpx~=0.28.1" \
"pydantic~=2.14.1" \
"mutagen~=1.48.1" \
"playwright~=1.64.1" \
"apprise>=1.13.1,<2" \
"bcrypt~=4.3.0" \
"pycryptodome~=4.2.0" \
"certifi>=2026.10.18" \
"seleniumbase>=4.54,<5"
$STD uv venv --clear --python "$PYTHON_VERSION" .venv
$STD uv pip install --python .venv/bin/python "${PIP_DEPS[@]}"
PLAYWRIGHT_BROWSERS_PATH=/opt/ms-playwright $STD .venv/bin/playwright install chromium
if [[ "$(arch_resolve)" == "amd64" ]]; then
$STD .venv/bin/sbase get uc_driver stable
else
install -m 755 /usr/bin/chromedriver ".venv/lib/python${PYTHON_VERSION}/site-packages/seleniumbase/drivers/uc_driver"
fi
$STD .venv/bin/python -c "from pathlib import Path; import seleniumbase; from seleniumbase.undetected.patcher import Patcher; driver = Path(seleniumbase.__file__).parent / 'drivers' / 'uc_driver'; Patcher(executable_path=str(driver)).auto(); driver.chmod(0o755)"
msg_ok "Updated MusicGrabber"
CLEAN_INSTALL=1 fetch_and_deploy_from_url "https://codeload.github.com/FraysKosher/flac-verifier/tar.gz/$(grep -oP 'FraysKosher/flac-verifier/tar.gz/\K[0-9a-f]+' /opt/musicgrabber/Dockerfile)" "/opt/flac-verifier/engine"
FLAC_VERIFIER_VERSION="$(grep -m1 -oP 'flac-verifier/releases/download/v\K[0-9.]+' /opt/musicgrabber/Dockerfile || true)"
if [[ -n "$FLAC_VERIFIER_VERSION" ]]; then
CLEAN_INSTALL=1 fetch_and_deploy_from_url "https://github.com/FraysKosher/flac-verifier/releases/download/v${FLAC_VERIFIER_VERSION}/flac-verifier-cli-${FLAC_VERIFIER_VERSION}-$(arch_resolve "x86_64" "aarch64")-unknown-linux-musl.tar.gz" "/opt/flac-verifier"
else
msg_warn "MusicGrabber names no FLAC Verifier release, the lossless check stays unavailable"
fi
msg_info "Starting MusicGrabber"
systemctl start musicgrabber
+17 -4
View File
@@ -50,12 +50,25 @@ function update_script() {
export DOTNET_SYSTEM_NET_DISABLEIPV6=1
$STD dotnet publish src/NetworkOptimizer.Web -c Release -r "$RID" --self-contained -o /opt/networkoptimizer/publish
chmod +x /opt/networkoptimizer/publish/NetworkOptimizer.Web
mkdir -p /opt/networkoptimizer/publish/tools
cd /opt/networkoptimizer/src/uwnspeedtest
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $STD go build -trimpath -ldflags "-s -w" -o /opt/networkoptimizer/publish/tools/uwnspeedtest-linux-arm64 .
[[ "$(arch_resolve)" != "arm64" ]] && CGO_ENABLED=0 GOOS=linux GOARCH="$(arch_resolve)" $STD go build -trimpath -ldflags "-s -w" -o "/opt/networkoptimizer/publish/tools/uwnspeedtest-linux-$(arch_resolve)" .
msg_ok "Rebuilt NetworkOptimizer"
msg_info "Building Go Helpers"
TOOLS=/opt/networkoptimizer/publish/tools
VERSION="$(cat ~/.networkoptimizer)"
LDFLAGS="-s -w -X main.version=${VERSION#v}"
mkdir -p "$TOOLS"
cd /opt/networkoptimizer/src/uwnspeedtest
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $STD go build -trimpath -ldflags "$LDFLAGS" -o "$TOOLS/uwnspeedtest-linux-arm64" .
[[ "$(arch_resolve)" != "arm64" ]] && CGO_ENABLED=0 GOOS=linux GOARCH="$(arch_resolve)" $STD go build -trimpath -ldflags "$LDFLAGS" -o "$TOOLS/uwnspeedtest-linux-$(arch_resolve)" .
cd /opt/networkoptimizer/src/wansteer
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $STD go build -trimpath -ldflags "$LDFLAGS" -o "$TOOLS/wansteer-linux-arm64" .
cd /opt/networkoptimizer/src/apagent
CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 $STD go build -trimpath -ldflags "$LDFLAGS" -o "$TOOLS/apagent-linux-arm" .
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $STD go build -trimpath -ldflags "$LDFLAGS" -o "$TOOLS/apagent-linux-arm64" .
CGO_ENABLED=0 GOOS=linux GOARCH=mipsle GOMIPS=softfloat $STD go build -trimpath -ldflags "$LDFLAGS" -o "$TOOLS/apagent-linux-mipsle" .
CGO_ENABLED=0 GOOS=linux GOARCH=mips GOMIPS=softfloat $STD go build -trimpath -ldflags "$LDFLAGS" -o "$TOOLS/apagent-linux-mips" .
msg_ok "Built Go Helpers"
msg_info "Starting Service"
systemctl start networkoptimizer
msg_ok "Started Service"
-16
View File
@@ -26,22 +26,6 @@ function update_script() {
check_container_storage
check_container_resources
if [[ -f /etc/pangolin/pangolin-site.env ]]; then
if check_for_gh_release "pangolin-cli" "fosrl/cli"; then
msg_info "Stopping Service"
systemctl stop pangolin-site
msg_ok "Stopped Service"
fetch_and_deploy_gh_release "pangolin-cli" "fosrl/cli" "singlefile" "latest" "/opt/pangolin-cli" "pangolin-cli_linux_$(arch_resolve)"
ln -sf /opt/pangolin-cli/pangolin-cli /usr/local/bin/pangolin
msg_info "Starting Service"
systemctl start pangolin-site
msg_ok "Started Service"
fi
exit
fi
if [[ ! -f /etc/newt/newt.env ]]; then
msg_error "No ${APP} Installation Found!"
exit
+12 -25
View File
@@ -63,36 +63,23 @@ chown hermes:hermes /home/hermes/.hermes/.env
chmod 600 /home/hermes/.hermes/.env
msg_ok "Configured API Server"
msg_info "Creating Dashboard Service"
mkdir -p /home/hermes/.config/systemd/user
cat <<EOF >/home/hermes/.config/systemd/user/hermes-dashboard.service
[Unit]
Description=Hermes Agent Web Dashboard
After=network-online.target
[Service]
Type=simple
UMask=0077
WorkingDirectory=%h
EnvironmentFile=/etc/default/hermes
ExecStart=%h/.local/bin/hermes dashboard --host 127.0.0.1 --port 9119 --no-open
Restart=on-failure
RestartSec=5
[Install]
WantedBy=default.target
EOF
chown -R hermes:hermes /home/hermes/.config
$STD runuser -l hermes -c 'systemctl --user daemon-reload && systemctl --user enable --now hermes-dashboard'
msg_ok "Created Dashboard Service"
msg_info "Setting up Gateway and Webapp"
$STD runuser -l hermes -c '
set -a; source /etc/default/hermes; set +a
hermes webapp --build-only
hermes config set webapp.enabled true
hermes config set webapp.host 127.0.0.1
hermes config set webapp.port 9119
hermes gateway install
systemctl --user enable --now hermes-gateway
'
msg_ok "Set up Gateway and Webapp"
msg_info "Creating Setup Helper"
cat <<'SETUP' >/usr/bin/hermes-setup
#!/usr/bin/env bash
su - hermes -c 'set -a; source /etc/default/hermes; set +a; hermes setup'
if [[ -f /home/hermes/.config/systemd/user/hermes-gateway.service ]]; then
su - hermes -c 'systemctl --user enable --now hermes-gateway'
fi
su - hermes -c 'systemctl --user enable -q hermes-gateway && systemctl --user restart hermes-gateway'
echo "Hermes setup complete."
SETUP
chmod +x /usr/bin/hermes-setup
+6 -4
View File
@@ -204,7 +204,7 @@ export LD_RUN_PATH=/usr/local/lib
# Immich ships the custom photo-processing libraries (libjxl, jpegli, libheif,
# libraw, ImageMagick, libvips) prebuilt in its own OCI base image. Pull the one
# the release's Dockerfile pins (skopeo + umoci, no container runtime) and use its
# /usr/local. There is no compile fallback: this needs Proxmox VE 9.1 or newer.
# /usr/local. There is no compile fallback.
msg_info "Deploying prebuilt image-processing libraries"
BASE_REF="$(curl -fsSL "https://raw.githubusercontent.com/immich-app/immich/${RELEASE}/server/Dockerfile" | awk '/^FROM ghcr.io\/immich-app\/base-server-dev/ {print $2; exit}')" || true
if [[ -z "$BASE_REF" ]]; then
@@ -220,14 +220,16 @@ if ! $STD apt install -y --no-install-recommends skopeo umoci; then
fi
OCI_DIR="$(mktemp -d)"
OCI_BUNDLE="$(mktemp -d)"
if ! $STD skopeo copy --override-os linux --override-arch "$(arch_resolve amd64 arm64)" "docker://${BASE_IMAGE}" "oci:${OCI_DIR}:img"; then
if ! $STD skopeo copy --retry-times 3 --override-os linux --override-arch "$(arch_resolve amd64 arm64)" "docker://${BASE_IMAGE}" "oci:${OCI_DIR}:img"; then
rm -rf "$OCI_DIR" "$OCI_BUNDLE"
msg_error "Could not download Immich's base image (${BASE_IMAGE})."
exit 115
fi
if ! $STD umoci unpack --image "${OCI_DIR}:img" "$OCI_BUNDLE"; then
# --rootless skips restoring the image's owners: a container whose idmap leaves out
# one of them (uid 1000 for bind mounts) fails lchown with "invalid argument".
if ! $STD umoci unpack --rootless --image "${OCI_DIR}:img" "$OCI_BUNDLE"; then
rm -rf "$OCI_DIR" "$OCI_BUNDLE"
msg_error "Could not unpack Immich's base image. Immich needs Proxmox VE 9.1 or newer."
msg_error "Could not unpack Immich's base image."
exit 105
fi
# The libraries, headers and ImageMagick data, without the node runtime, global
+18 -20
View File
@@ -21,26 +21,23 @@ $STD apt install -y \
msg_ok "Installed Dependencies"
setup_ffmpeg
PYTHON_VERSION="3.12" setup_uv
fetch_and_deploy_gh_release "yt-dlp" "yt-dlp/yt-dlp" "singlefile" "latest" "/usr/local/bin" "yt-dlp_$(arch_resolve "linux" "linux_aarch64")"
fetch_and_deploy_gh_release "deno" "denoland/deno" "prebuild" "latest" "/usr/local/bin" "deno-$(arch_resolve "x86_64" "aarch64")-unknown-linux-gnu.zip"
fetch_and_deploy_gl_tag "musicgrabber" "g33kphr33k/musicgrabber" "v*"
DOCKERFILE="$(</opt/musicgrabber/Dockerfile)"
PYTHON_VERSION="$(grep -oP '^FROM python:\K[0-9]+\.[0-9]+' <<<"$DOCKERFILE" | tail -n1 || true)"
mapfile -t PIP_DEPS < <(awk '{ if (sub(/\\$/, "")) printf "%s ", $0; else print }' <<<"$DOCKERFILE" | sed 's/&&/\n/g' | sed -n -E 's/^(RUN)?[[:space:]]*pip install //p' | tr -d "\"'" | tr -s ' ' '\n' | grep -E '^[A-Za-z0-9][A-Za-z0-9._-]*(\[[A-Za-z0-9,_-]+\])?([~=!<>]=?[^[:space:]]+)?$')
if [[ -z "$PYTHON_VERSION" || ${#PIP_DEPS[@]} -eq 0 ]]; then
msg_error "MusicGrabber's Dockerfile does not name its Python version and packages"
exit 250
fi
setup_uv
msg_info "Setting up MusicGrabber"
cd /opt/musicgrabber
$STD uv venv --python 3.12 .venv
$STD uv pip install --python .venv/bin/python \
"fastapi~=0.162.0" \
"uvicorn[standard]~=0.54.0" \
"httpx~=0.28.1" \
"pydantic~=2.14.1" \
"mutagen~=1.48.1" \
"playwright~=1.64.1" \
"apprise>=1.13.1,<2" \
"bcrypt~=4.3.0" \
"pycryptodome~=4.2.0" \
"certifi>=2026.10.18" \
"seleniumbase>=4.54,<5"
$STD uv venv --python "$PYTHON_VERSION" .venv
$STD uv pip install --python .venv/bin/python "${PIP_DEPS[@]}"
PLAYWRIGHT_BROWSERS_PATH=/opt/ms-playwright $STD .venv/bin/playwright install --with-deps chromium
msg_ok "Set up MusicGrabber"
@@ -56,16 +53,17 @@ if [[ "$(arch_resolve)" == "amd64" ]]; then
$STD .venv/bin/sbase get uc_driver stable
else
$STD apt install -y chromium chromium-driver
install -m 755 /usr/bin/chromedriver .venv/lib/python3.12/site-packages/seleniumbase/drivers/uc_driver
install -m 755 /usr/bin/chromedriver ".venv/lib/python${PYTHON_VERSION}/site-packages/seleniumbase/drivers/uc_driver"
fi
$STD .venv/bin/python -c "from pathlib import Path; import seleniumbase; from seleniumbase.undetected.patcher import Patcher; driver = Path(seleniumbase.__file__).parent / 'drivers' / 'uc_driver'; Patcher(executable_path=str(driver)).auto(); driver.chmod(0o755)"
msg_ok "Installed Browser for SeleniumBase"
msg_info "Setting up FLAC Verifier"
$STD uv venv --python 3.12 /opt/flac-verifier
$STD uv pip install --python /opt/flac-verifier/bin/python "numpy==2.2.6" "scipy==1.15.3" "soundfile==0.13.1" "mutagen==1.47.0"
msg_ok "Set up FLAC Verifier"
fetch_and_deploy_from_url "https://codeload.github.com/FraysKosher/flac-verifier/tar.gz/$(grep -oP 'FraysKosher/flac-verifier/tar.gz/\K[0-9a-f]+' /opt/musicgrabber/Dockerfile)" "/opt/flac-verifier/engine"
FLAC_VERIFIER_VERSION="$(grep -m1 -oP 'flac-verifier/releases/download/v\K[0-9.]+' /opt/musicgrabber/Dockerfile || true)"
if [[ -n "$FLAC_VERIFIER_VERSION" ]]; then
fetch_and_deploy_from_url "https://github.com/FraysKosher/flac-verifier/releases/download/v${FLAC_VERIFIER_VERSION}/flac-verifier-cli-${FLAC_VERIFIER_VERSION}-$(arch_resolve "x86_64" "aarch64")-unknown-linux-musl.tar.gz" "/opt/flac-verifier"
else
msg_warn "MusicGrabber names no FLAC Verifier release, the lossless check stays unavailable"
fi
msg_info "Configuring MusicGrabber"
mkdir -p /opt/musicgrabber_data/music
+15 -5
View File
@@ -43,12 +43,22 @@ $STD dotnet publish src/NetworkOptimizer.Web -c Release -r "$RID" --self-contain
chmod +x /opt/networkoptimizer/publish/NetworkOptimizer.Web
msg_ok "Built NetworkOptimizer"
msg_info "Building Speed Test Binaries"
mkdir -p /opt/networkoptimizer/publish/tools
msg_info "Building Go Helpers"
TOOLS=/opt/networkoptimizer/publish/tools
VERSION="$(cat ~/.networkoptimizer)"
LDFLAGS="-s -w -X main.version=${VERSION#v}"
mkdir -p "$TOOLS"
cd /opt/networkoptimizer/src/uwnspeedtest
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $STD go build -trimpath -ldflags "-s -w" -o /opt/networkoptimizer/publish/tools/uwnspeedtest-linux-arm64 .
[[ "$(arch_resolve)" != "arm64" ]] && CGO_ENABLED=0 GOOS=linux GOARCH="$(arch_resolve)" $STD go build -trimpath -ldflags "-s -w" -o "/opt/networkoptimizer/publish/tools/uwnspeedtest-linux-$(arch_resolve)" .
msg_ok "Built Speed Test Binaries"
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $STD go build -trimpath -ldflags "$LDFLAGS" -o "$TOOLS/uwnspeedtest-linux-arm64" .
[[ "$(arch_resolve)" != "arm64" ]] && CGO_ENABLED=0 GOOS=linux GOARCH="$(arch_resolve)" $STD go build -trimpath -ldflags "$LDFLAGS" -o "$TOOLS/uwnspeedtest-linux-$(arch_resolve)" .
cd /opt/networkoptimizer/src/wansteer
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $STD go build -trimpath -ldflags "$LDFLAGS" -o "$TOOLS/wansteer-linux-arm64" .
cd /opt/networkoptimizer/src/apagent
CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 $STD go build -trimpath -ldflags "$LDFLAGS" -o "$TOOLS/apagent-linux-arm" .
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $STD go build -trimpath -ldflags "$LDFLAGS" -o "$TOOLS/apagent-linux-arm64" .
CGO_ENABLED=0 GOOS=linux GOARCH=mipsle GOMIPS=softfloat $STD go build -trimpath -ldflags "$LDFLAGS" -o "$TOOLS/apagent-linux-mipsle" .
CGO_ENABLED=0 GOOS=linux GOARCH=mips GOMIPS=softfloat $STD go build -trimpath -ldflags "$LDFLAGS" -o "$TOOLS/apagent-linux-mips" .
msg_ok "Built Go Helpers"
msg_info "Configuring NetworkOptimizer"
cat <<EOF >/opt/networkoptimizer/networkoptimizer.env
+14 -61
View File
@@ -13,82 +13,36 @@ setting_up_container
network_check
update_os
NEWT_AGENT="${var_newt_agent:-}"
if [[ -z "$NEWT_AGENT" ]]; then
read -rp "Connector: newt or cli (Pangolin CLI) [newt]: " NEWT_AGENT || true
fi
NEWT_AGENT="${NEWT_AGENT:-newt}"
if [[ "$NEWT_AGENT" != "newt" && "$NEWT_AGENT" != "cli" ]]; then
msg_error "Unknown connector '${NEWT_AGENT}', use newt or cli. Aborting."
exit 64
fi
fetch_and_deploy_gh_release "newt" "fosrl/newt" "singlefile" "latest" "/opt/newt" "newt_linux_$(arch_resolve)"
ln -sf /opt/newt/newt /usr/local/bin/newt
NEWT_ID="${NEWT_ID:-${var_newt_id:-}}"
[[ -n "$NEWT_ID" ]] || read -rp "Site ID (from your Pangolin dashboard): " NEWT_ID || true
[[ -n "$NEWT_ID" ]] || read -rp "Newt ID (from your Pangolin dashboard): " NEWT_ID || true
NEWT_SECRET="${NEWT_SECRET:-${var_newt_secret:-}}"
if [[ -z "$NEWT_SECRET" ]]; then
read -rsp "Site Secret: " NEWT_SECRET || true
read -rsp "Newt Secret: " NEWT_SECRET || true
echo
fi
PANGOLIN_ENDPOINT="${PANGOLIN_ENDPOINT:-${var_newt_endpoint:-}}"
[[ -n "$PANGOLIN_ENDPOINT" ]] || read -rp "Pangolin endpoint (e.g. https://pangolin.example.com): " PANGOLIN_ENDPOINT || true
if [[ -z "$NEWT_ID" || -z "$NEWT_SECRET" || -z "$PANGOLIN_ENDPOINT" ]]; then
msg_error "Site ID, Secret and Endpoint are all required. Aborting."
msg_error "Newt ID, Secret and Endpoint are all required. Aborting."
exit 64
fi
if [[ "$NEWT_AGENT" == "cli" ]]; then
fetch_and_deploy_gh_release "pangolin-cli" "fosrl/cli" "singlefile" "latest" "/opt/pangolin-cli" "pangolin-cli_linux_$(arch_resolve)"
ln -sf /opt/pangolin-cli/pangolin-cli /usr/local/bin/pangolin
msg_info "Configuring Pangolin CLI"
mkdir -p /etc/pangolin
cat <<EOF >/etc/pangolin/pangolin-site.env
SITE_ID=${NEWT_ID}
SITE_SECRET=${NEWT_SECRET}
PANGOLIN_ENDPOINT=${PANGOLIN_ENDPOINT}
EOF
chmod 600 /etc/pangolin/pangolin-site.env
msg_ok "Configured Pangolin CLI"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/pangolin-site.service
[Unit]
Description=Pangolin Site (Pangolin CLI)
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
EnvironmentFile=/etc/pangolin/pangolin-site.env
ExecStart=/usr/local/bin/pangolin up site
Restart=always
RestartSec=2
UMask=0077
PrivateTmp=true
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now pangolin-site
msg_ok "Created Service"
else
fetch_and_deploy_gh_release "newt" "fosrl/newt" "singlefile" "latest" "/opt/newt" "newt_linux_$(arch_resolve)"
ln -sf /opt/newt/newt /usr/local/bin/newt
msg_info "Configuring Newt"
mkdir -p /etc/newt
cat <<EOF >/etc/newt/newt.env
msg_info "Configuring Newt"
mkdir -p /etc/newt
cat <<EOF >/etc/newt/newt.env
NEWT_ID=${NEWT_ID}
NEWT_SECRET=${NEWT_SECRET}
PANGOLIN_ENDPOINT=${PANGOLIN_ENDPOINT}
EOF
chmod 600 /etc/newt/newt.env
msg_ok "Configured Newt"
chmod 600 /etc/newt/newt.env
msg_ok "Configured Newt"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/newt.service
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/newt.service
[Unit]
Description=Newt (Pangolin tunnel client)
Wants=network-online.target
@@ -106,9 +60,8 @@ PrivateTmp=true
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now newt
msg_ok "Created Service"
fi
systemctl enable -q --now newt
msg_ok "Created Service"
motd_ssh
customize