mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-07-14 18:05:07 +02:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c46c5effbf | |||
| 52a8649b5a |
+71
-38
@@ -31,50 +31,83 @@ function update_script() {
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
update_available=$(curl -fsSL -X 'GET' "http://localhost:19200/api/status/update-available" -H 'accept: application/json' | jq .UpdateAvailable)
|
local proceed=false
|
||||||
if [[ "${update_available}" == "true" ]]; then
|
|
||||||
msg_info "Stopping Service"
|
|
||||||
systemctl --all stop 'fileflows*'
|
|
||||||
msg_info "Stopped Service"
|
|
||||||
|
|
||||||
msg_info "Creating Backup"
|
if systemctl list-unit-files 'fileflows.service' --no-legend 2>/dev/null | grep -q '^fileflows\.service'; then
|
||||||
ls /opt/*.tar.gz &>/dev/null && rm -f /opt/*.tar.gz
|
tmp=$(mktemp)
|
||||||
backup_filename="/opt/${APP}_backup_$(date +%F).tar.gz"
|
http_code=$(curl -sSL -X 'GET' "http://localhost:19200/api/status/update-available" -H 'accept: application/json' -o "$tmp" -w '%{http_code}' 2>/dev/null) || http_code="000"
|
||||||
tar -czf "$backup_filename" -C /opt/fileflows Data
|
if [[ "$http_code" == "200" ]]; then
|
||||||
msg_ok "Backup Created"
|
update_available=$(jq -r '.UpdateAvailable // false' "$tmp" 2>/dev/null)
|
||||||
|
rm -f "$tmp"
|
||||||
# FileFlows tracks the latest release, whose .NET target can move (e.g. 8 -> 10);
|
if [[ "${update_available}" == "true" ]]; then
|
||||||
# ensure the current ASP.NET Core Runtime so an existing install doesn't fail to
|
proceed=true
|
||||||
# start after updating to a newer .NET major version.
|
else
|
||||||
msg_info "Ensuring ASP.NET Core Runtime"
|
msg_ok "No update required. ${APP} is already at latest version"
|
||||||
if [[ "$(arch_resolve)" == "arm64" ]]; then
|
exit
|
||||||
if [[ ! -x /usr/lib/dotnet10/dotnet ]]; then
|
fi
|
||||||
curl -fsSL https://dot.net/v1/dotnet-install.sh -o /tmp/dotnet-install.sh
|
else
|
||||||
$STD bash /tmp/dotnet-install.sh --channel 10.0 --runtime aspnetcore --install-dir /usr/lib/dotnet10
|
rm -f "$tmp"
|
||||||
ln -sf /usr/lib/dotnet10/dotnet /usr/bin/dotnet
|
if [[ "$http_code" == "401" ]]; then
|
||||||
rm -f /tmp/dotnet-install.sh
|
msg_warn "Could not check for updates: API returned 401 (security may be enabled)."
|
||||||
|
else
|
||||||
|
msg_warn "Could not check for updates: API unreachable (HTTP ${http_code})."
|
||||||
|
fi
|
||||||
|
if [[ "${FORCE_UPDATE:-}" == "1" ]]; then
|
||||||
|
proceed=true
|
||||||
|
else
|
||||||
|
read -r -p "${TAB3}Force update without version check? [y/N]: " CONFIRM
|
||||||
|
if [[ "$CONFIRM" =~ ^([yY][eE][sS]|[yY])$ ]]; then
|
||||||
|
proceed=true
|
||||||
|
else
|
||||||
|
msg_error "Update aborted."
|
||||||
|
exit
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
elif ! is_package_installed "aspnetcore-runtime-10.0"; then
|
|
||||||
$STD apt remove -y aspnetcore-runtime-8.0 aspnetcore-runtime-9.0 2>/dev/null || true
|
|
||||||
setup_deb822_repo \
|
|
||||||
"microsoft" \
|
|
||||||
"https://packages.microsoft.com/keys/microsoft-2025.asc" \
|
|
||||||
"https://packages.microsoft.com/debian/13/prod/" \
|
|
||||||
"trixie"
|
|
||||||
$STD apt install -y aspnetcore-runtime-10.0
|
|
||||||
fi
|
fi
|
||||||
msg_ok "Ensured ASP.NET Core Runtime"
|
|
||||||
|
|
||||||
fetch_and_deploy_from_url "https://fileflows.com/downloads/zip" "/opt/fileflows"
|
|
||||||
|
|
||||||
msg_info "Starting Service"
|
|
||||||
systemctl --all start 'fileflows*'
|
|
||||||
msg_ok "Started Service"
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
else
|
else
|
||||||
msg_ok "No update required. ${APP} is already at latest version"
|
proceed=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$proceed" != "true" ]]; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
msg_info "Stopping Service"
|
||||||
|
systemctl --all stop 'fileflows*'
|
||||||
|
msg_ok "Stopped Service"
|
||||||
|
|
||||||
|
msg_info "Creating Backup"
|
||||||
|
ls /opt/*.tar.gz &>/dev/null && rm -f /opt/*.tar.gz
|
||||||
|
backup_filename="/opt/${APP}_backup_$(date +%F).tar.gz"
|
||||||
|
tar -czf "$backup_filename" -C /opt/fileflows Data
|
||||||
|
msg_ok "Backup Created"
|
||||||
|
|
||||||
|
msg_info "Ensuring ASP.NET Core Runtime"
|
||||||
|
if [[ "$(arch_resolve)" == "arm64" ]]; then
|
||||||
|
if [[ ! -x /usr/lib/dotnet10/dotnet ]]; then
|
||||||
|
curl -fsSL https://dot.net/v1/dotnet-install.sh -o /tmp/dotnet-install.sh
|
||||||
|
$STD bash /tmp/dotnet-install.sh --channel 10.0 --runtime aspnetcore --install-dir /usr/lib/dotnet10
|
||||||
|
ln -sf /usr/lib/dotnet10/dotnet /usr/bin/dotnet
|
||||||
|
rm -f /tmp/dotnet-install.sh
|
||||||
|
fi
|
||||||
|
elif ! is_package_installed "aspnetcore-runtime-10.0"; then
|
||||||
|
$STD apt remove -y aspnetcore-runtime-8.0 aspnetcore-runtime-9.0 2>/dev/null || true
|
||||||
|
setup_deb822_repo \
|
||||||
|
"microsoft" \
|
||||||
|
"https://packages.microsoft.com/keys/microsoft-2025.asc" \
|
||||||
|
"https://packages.microsoft.com/debian/13/prod/" \
|
||||||
|
"trixie"
|
||||||
|
$STD apt install -y aspnetcore-runtime-10.0
|
||||||
|
fi
|
||||||
|
msg_ok "Ensured ASP.NET Core Runtime"
|
||||||
|
|
||||||
|
fetch_and_deploy_from_url "https://fileflows.com/downloads/zip" "/opt/fileflows"
|
||||||
|
|
||||||
|
msg_info "Starting Service"
|
||||||
|
systemctl --all start 'fileflows*'
|
||||||
|
msg_ok "Started Service"
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -30,7 +30,7 @@ function update_script() {
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
RELEASE="v7.2.2"
|
RELEASE="v7.2.1"
|
||||||
if check_for_gh_release "OpenCloud" "opencloud-eu/opencloud" "${RELEASE}" "each release is tested individually before the version is updated. Please do not open issues for this"; then
|
if check_for_gh_release "OpenCloud" "opencloud-eu/opencloud" "${RELEASE}" "each release is tested individually before the version is updated. Please do not open issues for this"; then
|
||||||
msg_info "Stopping services"
|
msg_info "Stopping services"
|
||||||
systemctl stop opencloud opencloud-wopi
|
systemctl stop opencloud opencloud-wopi
|
||||||
|
|||||||
@@ -55,9 +55,12 @@ if [[ "$install_server" =~ ^[Ss]$ ]]; then
|
|||||||
msg_ok "Installed FileFlows Server"
|
msg_ok "Installed FileFlows Server"
|
||||||
else
|
else
|
||||||
msg_info "Installing FileFlows Node"
|
msg_info "Installing FileFlows Node"
|
||||||
|
read -r -p "${TAB3}Enter FileFlows Server URL (e.g. http://192.168.1.10:19200): " server_url
|
||||||
|
while [[ -z "${server_url// /}" ]]; do
|
||||||
|
read -r -p "${TAB3}Enter FileFlows Server URL (e.g. http://192.168.1.10:19200): " server_url
|
||||||
|
done
|
||||||
cd /opt/fileflows/Node
|
cd /opt/fileflows/Node
|
||||||
$STD dotnet FileFlows.Node.dll
|
$STD dotnet FileFlows.Node.dll --server "$server_url" --systemd install --root true
|
||||||
$STD dotnet FileFlows.Node.dll --systemd install --root true
|
|
||||||
systemctl enable -q --now fileflows-node
|
systemctl enable -q --now fileflows-node
|
||||||
msg_ok "Installed FileFlows Node"
|
msg_ok "Installed FileFlows Node"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ $STD sudo -u cool coolconfig set-admin-password --user=admin --password="$COOLPA
|
|||||||
echo "$COOLPASS" >~/.coolpass
|
echo "$COOLPASS" >~/.coolpass
|
||||||
msg_ok "Installed Collabora Online"
|
msg_ok "Installed Collabora Online"
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "OpenCloud" "opencloud-eu/opencloud" "singlefile" "v7.2.2" "/usr/bin" "opencloud-*-linux-$(arch_resolve)"
|
fetch_and_deploy_gh_release "OpenCloud" "opencloud-eu/opencloud" "singlefile" "v7.2.1" "/usr/bin" "opencloud-*-linux-$(arch_resolve)"
|
||||||
mv /usr/bin/OpenCloud /usr/bin/opencloud
|
mv /usr/bin/OpenCloud /usr/bin/opencloud
|
||||||
|
|
||||||
msg_info "Configuring OpenCloud"
|
msg_info "Configuring OpenCloud"
|
||||||
|
|||||||
Reference in New Issue
Block a user