From 82c5722abb192e513a9268f8f78410b1e8babc92 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 28 Apr 2025 13:52:39 +0200 Subject: [PATCH] little fixes --- ct/umlautadaptarr.sh | 32 ++++++++++++++---------- frontend/public/json/umlautadaptarr.json | 9 +++---- install/umlautadaptarr-install.sh | 14 +++++------ 3 files changed, 30 insertions(+), 25 deletions(-) diff --git a/ct/umlautadaptarr.sh b/ct/umlautadaptarr.sh index 7f2f07b..696d892 100644 --- a/ct/umlautadaptarr.sh +++ b/ct/umlautadaptarr.sh @@ -23,24 +23,30 @@ function update_script() { header_info check_container_storage check_container_resources - - if [[ ! -f /opt/UmlautAdaptarr/appsettings.json ]]; then + if [[ ! -d /opt/UmlautAdaptarr ]]; then msg_error "No ${APP} Installation Found!" exit fi RELEASE=$(curl -fsSL https://api.github.com/repos/PCJones/Umlautadaptarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}') - if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then - msg_info "Updating $APP..." - systemctl stop umlautadaptarr - temp_file=$(mktemp) - curl -fsSL "https://github.com/PCJones/Umlautadaptarr/releases/download/${RELEASE}/linux-x64.zip" -o $temp_file - $STD unzip -u $temp_file '*/**' -d /opt/UmlautAdaptarr - systemctl start umlautadaptarr - msg_ok "$APP has been updated." + if [[ ! -f /opt/UmlautAdaptarr_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/UmlautAdaptarr_version.txt)" ]]; then + msg_info "Stopping Service" + systemctl stop umlautadaptarr + msg_ok "Stopped Service" + + msg_info "Updating ${APP}" + temp_file=$(mktemp) + curl -fsSL "https://github.com/PCJones/Umlautadaptarr/releases/download/${RELEASE}/linux-x64.zip" -o $temp_file + $STD unzip -u $temp_file '*/**' -d /opt/UmlautAdaptarr + msg_ok "Updated ${APP}" + + msg_info "Starting Service" + systemctl start umlautadaptarr + msg_ok "Started Service" + msg_ok "$APP has been updated to ${RELEASE}." else - msg_ok "No update required. ${APP} is already at ${RELEASE}" - fi - exit + msg_ok "No update required. ${APP} is already at ${RELEASE}" + fi + exit } start build_container diff --git a/frontend/public/json/umlautadaptarr.json b/frontend/public/json/umlautadaptarr.json index c432b91..459080f 100644 --- a/frontend/public/json/umlautadaptarr.json +++ b/frontend/public/json/umlautadaptarr.json @@ -4,7 +4,7 @@ "categories": [ 14 ], - "date_created": "2025-04-08", + "date_created": "2025-04-28", "type": "ct", "updateable": true, "privileged": false, @@ -12,8 +12,8 @@ "documentation": null, "website": "https://github.com/PCJones/UmlautAdaptarr", "logo": null, - "config_path": "", - "description": "A tool to work around Sonarr, Radarr, Lidarr and Readarrs problems with foreign languages", + "config_path": "/opt/UmlautAdaptarr/appsettings.json", + "description": "UmlautAdaptarr is a tool that fixes issues with how Sonarr, Radarr, Lidarr, and Readarr handle foreign languages. It sits between these apps and the indexers, changing searches and results, and renaming releases so the apps recognize them correctly.", "install_methods": [ { "type": "default", @@ -28,9 +28,8 @@ } ], "default_credentials": { - "username": "root", + "username": null, "password": null }, "notes": [] } - diff --git a/install/umlautadaptarr-install.sh b/install/umlautadaptarr-install.sh index c43acbf..eacf1d8 100644 --- a/install/umlautadaptarr-install.sh +++ b/install/umlautadaptarr-install.sh @@ -5,7 +5,7 @@ # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/PCJones/UmlautAdaptarr -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -18,10 +18,10 @@ $STD curl -fsSL https://packages.microsoft.com/config/debian/12/packages-microso $STD dpkg -i packages-microsoft-prod.deb $STD apt-get update $STD apt-get install -y \ - dotnet-sdk-8.0 \ - aspnetcore-runtime-8.0 - msg_ok "Installed Dependencies" - + dotnet-sdk-8.0 \ + aspnetcore-runtime-8.0 +msg_ok "Installed Dependencies" + msg_info "Installing Umlautadaptarr" temp_file=$(mktemp) RELEASE=$(curl -s https://api.github.com/repos/PCJones/Umlautadaptarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}') @@ -92,7 +92,7 @@ cat </opt/UmlautAdaptarr/appsettings.json EOF msg_ok "appsettings.json created" -msg_info "Creating systemd Service" +msg_info "Creating Service" cat </etc/systemd/system/umlautadaptarr.service [Unit] Description=UmlautAdaptarr Service @@ -110,7 +110,7 @@ Environment=ASPNETCORE_ENVIRONMENT=Production WantedBy=multi-user.target EOF systemctl -q --now enable umlautadaptarr -msg_ok "Created systemd Service" +msg_ok "Created Service" motd_ssh customize