This commit is contained in:
Slaviša Arežina 2025-12-10 21:38:24 +01:00 committed by GitHub
parent fe8e1be644
commit cafee135c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 14 additions and 30 deletions

View File

@ -27,24 +27,18 @@ function update_script() {
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/UmlautAdaptarr_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/UmlautAdaptarr_version.txt)" ]]; then
if check_for_gh_release "UmlautAdaptarr" "PCJones/Umlautadaptarr"; 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}"
fetch_and_deploy_gh_release "UmlautAdaptarr" "PCJones/Umlautadaptarr" "prebuild" "latest" "/opt/UmlautAdaptarr" "linux-x64.zip"
msg_info "Starting Service"
systemctl start umlautadaptarr
msg_ok "Started Service"
msg_ok "Updated successfully!"
else
msg_ok "No update required. ${APP} is already at ${RELEASE}"
fi
exit
}

View File

@ -9,7 +9,7 @@
"updateable": true,
"privileged": false,
"interface_port": 5005,
"documentation": null,
"documentation": "https://github.com/PCJones/UmlautAdaptarr/blob/master/README.md",
"website": "https://github.com/PCJones/UmlautAdaptarr",
"logo": "https://raw.githubusercontent.com/community-scripts/ProxmoxVE/refs/heads/main/misc/images/logo.png",
"config_path": "/opt/UmlautAdaptarr/appsettings.json",

View File

@ -14,30 +14,20 @@ network_check
update_os
msg_info "Installing Dependencies"
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg
cat <<EOF | sudo tee /etc/apt/sources.list.d/microsoft-prod.sources >/dev/null
Types: deb
URIs: https://packages.microsoft.com/debian/12/prod/
Suites: bookworm
Components: main
Signed-By: /usr/share/keyrings/microsoft-prod.gpg
EOF
$STD apt update
setup_deb822_repo \
"microsoft" \
"https://packages.microsoft.com/keys/microsoft.asc" \
"https://packages.microsoft.com/debian/12/prod/" \
"bookworm" \
"main"
$STD apt install -y \
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)}')
curl -fsSL "https://github.com/PCJones/Umlautadaptarr/releases/download/${RELEASE}/linux-x64.zip" -o $temp_file
$STD unzip -j $temp_file '*/**' -d /opt/UmlautAdaptarr
rm -f $temp_file
echo "${RELEASE}" >"/opt/UmlautAdaptarr_version.txt"
msg_ok "Installation completed"
fetch_and_deploy_gh_release "UmlautAdaptarr" "PCJones/Umlautadaptarr" "prebuild" "latest" "/opt/UmlautAdaptarr" "linux-x64.zip"
msg_info "Creating appsettings.json"
msg_info "Setting up UmlautAdaptarr"
cat <<EOF >/opt/UmlautAdaptarr/appsettings.json
{
"Logging": {
@ -97,7 +87,7 @@ cat <<EOF >/opt/UmlautAdaptarr/appsettings.json
}
}
EOF
msg_ok "appsettings.json created"
msg_ok "Setup UmlautAdaptarr"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/umlautadaptarr.service
@ -116,7 +106,7 @@ Environment=ASPNETCORE_ENVIRONMENT=Production
[Install]
WantedBy=multi-user.target
EOF
systemctl -q --now enable umlautadaptarr
systemctl enable -q --now umlautadaptarr
msg_ok "Created Service"
motd_ssh