Compare commits

..

1 Commits

Author SHA1 Message Date
CanbiZ (MickLesk)
87c6b3d73c fix(technitiumdns): always install .NET 10 if not already present
Previously the update script only upgraded .NET when aspnetcore-runtime-8.0
or 9.0 was detected via is_package_installed. Containers where detection
failed would silently skip the upgrade block, leaving Technitium v15
(requires .NET 10) starting against .NET 8/9 and immediately failing.

Changed condition to: install .NET 10 unless it is already installed.
Old 8.0/9.0 packages are removed with || true to avoid errors on clean
installs.

Fixes #14045
2026-04-27 08:51:58 +02:00
3 changed files with 3 additions and 9 deletions

View File

@@ -53,10 +53,6 @@ function update_script() {
export PATH="/root/.rbenv/shims:/root/.rbenv/bin:$PATH"
eval "$(/root/.rbenv/bin/rbenv init - bash)"
if ! grep -q "OTP_ENCRYPTION_PRIMARY_KEY" /opt/dawarich/.env; then
echo "OTP_ENCRYPTION_PRIMARY_KEY=$(openssl rand -hex 32)" >>/opt/dawarich/.env
fi
set -a && source /opt/dawarich/.env && set +a
$STD bundle config set --local deployment 'true'
@@ -71,8 +67,8 @@ function update_script() {
$STD npm install
fi
$STD bundle exec rails db:migrate
$STD bundle exec rake assets:precompile
$STD bundle exec rails db:migrate
$STD bundle exec rake data:migrate
msg_ok "Ran Migrations"

View File

@@ -32,8 +32,8 @@ function update_script() {
systemctl daemon-reload
systemctl enable -q --now technitium
fi
if is_package_installed "aspnetcore-runtime-8.0" || is_package_installed "aspnetcore-runtime-9.0"; then
$STD apt remove -y aspnetcore-runtime-*
if ! is_package_installed "aspnetcore-runtime-10.0"; then
$STD apt remove -y aspnetcore-runtime-8.0 aspnetcore-runtime-9.0 2>/dev/null || true
[ -f /etc/apt/sources.list.d/microsoft-prod.list ] && rm -f /etc/apt/sources.list.d/microsoft-prod.list
[ -f /usr/share/keyrings/microsoft-prod.gpg ] && rm -f /usr/share/keyrings/microsoft-prod.gpg
setup_deb822_repo \

View File

@@ -46,12 +46,10 @@ msg_ok "Set up Directories"
msg_info "Configuring Environment"
SECRET_KEY_BASE=$(openssl rand -hex 64)
OTP_ENCRYPTION_PRIMARY_KEY=$(openssl rand -hex 32)
RELEASE=$(get_latest_github_release "Freika/dawarich")
cat <<EOF >/opt/dawarich/.env
RAILS_ENV=production
SECRET_KEY_BASE=${SECRET_KEY_BASE}
OTP_ENCRYPTION_PRIMARY_KEY=${OTP_ENCRYPTION_PRIMARY_KEY}
DATABASE_HOST=localhost
DATABASE_USERNAME=${PG_DB_USER}
DATABASE_PASSWORD=${PG_DB_PASS}