mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-12-06 20:11:33 +01:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dea360752c | ||
|
|
8ae6cc3661 |
No files matched your search
+22
-2
@@ -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
|
||||
}
|
||||
|
||||
+2
-2
@@ -464,9 +464,9 @@ function fetch_prebuilt_libs() {
|
||||
msg_error "Could not download Immich's base image (${image}). Immich was not updated."
|
||||
exit 115
|
||||
fi
|
||||
if ! $STD umoci unpack --rootless --image "${oci_dir}:img" "$PREBUILT_BUNDLE"; then
|
||||
if ! $STD umoci unpack --image "${oci_dir}:img" "$PREBUILT_BUNDLE"; then
|
||||
rm -rf "$oci_dir" "$PREBUILT_BUNDLE"
|
||||
msg_error "Could not unpack Immich's base image. Immich was not updated."
|
||||
msg_error "Could not unpack Immich's base image. Immich needs Proxmox VE 9.1 or newer; it was not updated."
|
||||
exit 105
|
||||
fi
|
||||
rm -rf "$oci_dir"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
# /usr/local. There is no compile fallback: this needs Proxmox VE 9.1 or newer.
|
||||
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
|
||||
@@ -225,11 +225,9 @@ if ! $STD skopeo copy --override-os linux --override-arch "$(arch_resolve amd64
|
||||
msg_error "Could not download Immich's base image (${BASE_IMAGE})."
|
||||
exit 115
|
||||
fi
|
||||
# --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
|
||||
if ! $STD umoci unpack --image "${OCI_DIR}:img" "$OCI_BUNDLE"; then
|
||||
rm -rf "$OCI_DIR" "$OCI_BUNDLE"
|
||||
msg_error "Could not unpack Immich's base image."
|
||||
msg_error "Could not unpack Immich's base image. Immich needs Proxmox VE 9.1 or newer."
|
||||
exit 105
|
||||
fi
|
||||
# The libraries, headers and ImageMagick data, without the node runtime, global
|
||||
|
||||
Reference in new issue
Block a user