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,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

View File

@ -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": []
}

View File

@ -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 <<EOF >/opt/UmlautAdaptarr/appsettings.json
EOF
msg_ok "appsettings.json created"
msg_info "Creating systemd Service"
msg_info "Creating Service"
cat <<EOF >/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