little fixes

This commit is contained in:
CanbiZ 2025-04-28 13:52:39 +02:00
parent 1c810b6aa0
commit 82c5722abb
3 changed files with 30 additions and 25 deletions

View File

@ -23,20 +23,26 @@ function update_script() {
header_info header_info
check_container_storage check_container_storage
check_container_resources check_container_resources
if [[ ! -d /opt/UmlautAdaptarr ]]; then
if [[ ! -f /opt/UmlautAdaptarr/appsettings.json ]]; then
msg_error "No ${APP} Installation Found!" msg_error "No ${APP} Installation Found!"
exit exit
fi fi
RELEASE=$(curl -fsSL https://api.github.com/repos/PCJones/Umlautadaptarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}') 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 if [[ ! -f /opt/UmlautAdaptarr_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/UmlautAdaptarr_version.txt)" ]]; then
msg_info "Updating $APP..." msg_info "Stopping Service"
systemctl stop umlautadaptarr systemctl stop umlautadaptarr
msg_ok "Stopped Service"
msg_info "Updating ${APP}"
temp_file=$(mktemp) temp_file=$(mktemp)
curl -fsSL "https://github.com/PCJones/Umlautadaptarr/releases/download/${RELEASE}/linux-x64.zip" -o $temp_file curl -fsSL "https://github.com/PCJones/Umlautadaptarr/releases/download/${RELEASE}/linux-x64.zip" -o $temp_file
$STD unzip -u $temp_file '*/**' -d /opt/UmlautAdaptarr $STD unzip -u $temp_file '*/**' -d /opt/UmlautAdaptarr
msg_ok "Updated ${APP}"
msg_info "Starting Service"
systemctl start umlautadaptarr systemctl start umlautadaptarr
msg_ok "$APP has been updated." msg_ok "Started Service"
msg_ok "$APP has been updated to ${RELEASE}."
else else
msg_ok "No update required. ${APP} is already at ${RELEASE}" msg_ok "No update required. ${APP} is already at ${RELEASE}"
fi fi

View File

@ -4,7 +4,7 @@
"categories": [ "categories": [
14 14
], ],
"date_created": "2025-04-08", "date_created": "2025-04-28",
"type": "ct", "type": "ct",
"updateable": true, "updateable": true,
"privileged": false, "privileged": false,
@ -12,8 +12,8 @@
"documentation": null, "documentation": null,
"website": "https://github.com/PCJones/UmlautAdaptarr", "website": "https://github.com/PCJones/UmlautAdaptarr",
"logo": null, "logo": null,
"config_path": "", "config_path": "/opt/UmlautAdaptarr/appsettings.json",
"description": "A tool to work around Sonarr, Radarr, Lidarr and Readarrs problems with foreign languages", "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": [ "install_methods": [
{ {
"type": "default", "type": "default",
@ -28,9 +28,8 @@
} }
], ],
"default_credentials": { "default_credentials": {
"username": "root", "username": null,
"password": null "password": null
}, },
"notes": [] "notes": []
} }

View File

@ -5,7 +5,7 @@
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/PCJones/UmlautAdaptarr # Source: https://github.com/PCJones/UmlautAdaptarr
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color color
verb_ip6 verb_ip6
catch_errors catch_errors
@ -20,7 +20,7 @@ $STD apt-get update
$STD apt-get install -y \ $STD apt-get install -y \
dotnet-sdk-8.0 \ dotnet-sdk-8.0 \
aspnetcore-runtime-8.0 aspnetcore-runtime-8.0
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
msg_info "Installing Umlautadaptarr" msg_info "Installing Umlautadaptarr"
temp_file=$(mktemp) temp_file=$(mktemp)
@ -92,7 +92,7 @@ cat <<EOF >/opt/UmlautAdaptarr/appsettings.json
EOF EOF
msg_ok "appsettings.json created" msg_ok "appsettings.json created"
msg_info "Creating systemd Service" msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/umlautadaptarr.service cat <<EOF >/etc/systemd/system/umlautadaptarr.service
[Unit] [Unit]
Description=UmlautAdaptarr Service Description=UmlautAdaptarr Service
@ -110,7 +110,7 @@ Environment=ASPNETCORE_ENVIRONMENT=Production
WantedBy=multi-user.target WantedBy=multi-user.target
EOF EOF
systemctl -q --now enable umlautadaptarr systemctl -q --now enable umlautadaptarr
msg_ok "Created systemd Service" msg_ok "Created Service"
motd_ssh motd_ssh
customize customize