Merge pull request #54 from YunoHost-Apps/ci-auto-update-15.2.0

Upgrade to v15.2.0
This commit is contained in:
trendless
2026-06-15 18:57:30 -06:00
committed by GitHub
10 changed files with 63 additions and 44 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ It shall NOT be edited by hand.
DNS server for privacy and security DNS server for privacy and security
[![🌐 Official app website](https://img.shields.io/badge/Official_app_website-darkgreen?style=for-the-badge)](https://technitium.com/dns/) [![🌐 Official app website](https://img.shields.io/badge/Official_app_website-darkgreen?style=for-the-badge)](https://technitium.com/dns/)
[![Version: 14.3.0~ynh1](https://img.shields.io/badge/Version-14.3.0~ynh1-rgb(18,138,11)?style=for-the-badge)](https://ci-apps.yunohost.org/ci/apps/technitium-dns/) [![Version: 15.2.0~ynh1](https://img.shields.io/badge/Version-15.2.0~ynh1-rgb(18,138,11)?style=for-the-badge)](https://ci-apps.yunohost.org/ci/apps/technitium-dns/)
<div align="center"> <div align="center">
<a href="https://apps.yunohost.org/app/technitium-dns"><img height="100px" src="https://github.com/YunoHost/yunohost-artwork/raw/refs/heads/main/badges/neopossum-badges/badge_more_info_on_the_appstore.svg"/></a> <a href="https://apps.yunohost.org/app/technitium-dns"><img height="100px" src="https://github.com/YunoHost/yunohost-artwork/raw/refs/heads/main/badges/neopossum-badges/badge_more_info_on_the_appstore.svg"/></a>
+1
View File
@@ -0,0 +1 @@
0,15,30,45 0 * * * ln -sf $(ls -t /var/log/__APP__/dns/*.log | head -n 1) /var/log/__APP__/__APP__.log
+1 -1
View File
@@ -9,10 +9,10 @@ Group=__APP__
WorkingDirectory=__INSTALL_DIR__/sources/ WorkingDirectory=__INSTALL_DIR__/sources/
ExecStart=__INSTALL_DIR__/dotnet/dotnet __INSTALL_DIR__/sources/DnsServerApp.dll __DATA_DIR__ ExecStart=__INSTALL_DIR__/dotnet/dotnet __INSTALL_DIR__/sources/DnsServerApp.dll __DATA_DIR__
Restart=always Restart=always
# Restart service after 10 seconds if the dotnet service crashes:
RestartSec=10 RestartSec=10
KillSignal=SIGINT KillSignal=SIGINT
SyslogIdentifier=dns-server SyslogIdentifier=dns-server
Environment=DNS_SERVER_LOG_FOLDER_PATH=/var/log/__APP__/dns
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
+16 -9
View File
@@ -7,7 +7,7 @@ name = "Technitium DNS"
description.en = "DNS server for privacy and security" description.en = "DNS server for privacy and security"
description.fr = "Serveur DNS pour la confidentialité et la sécurité" description.fr = "Serveur DNS pour la confidentialité et la sécurité"
version = "14.3.0~ynh1" version = "15.2.0~ynh1"
maintainers = ["Navan Chauhan"] maintainers = ["Navan Chauhan"]
@@ -44,21 +44,28 @@ ram.runtime = "50M"
[resources] [resources]
[resources.sources.main] [resources.sources.main]
url = "https://download.technitium.com/dns/archive/14.3.0/DnsServerPortable.tar.gz" url = "https://github.com/TechnitiumSoftware/DnsServer/archive/refs/tags/v15.2.0.tar.gz"
sha256 = "9b2deaa54378e5abef1917907876ef2d0c89e0b6d09fc494e6a799b6316adea7" sha256 = "9247b3c70a8f58d336741819b4550b29937815dc535d1cc0f36ffd7cedb8860c"
in_subdir = false in_subdir = false
# Careful, this autoupdate does not put the right asset, it only serves as a notification! # Careful, this autoupdate does not put the right asset, it only serves as a notification!
autoupdate.strategy = "latest_github_tag" autoupdate.strategy = "latest_github_tag"
autoupdate.asset = "tarball" autoupdate.asset = "tarball"
autoupdate.needs_manual_tweaks = true autoupdate.needs_manual_tweaks = true
prefetch = false
[resources.sources.prebuilt]
url = "https://download.technitium.com/dns/archive/15.2.0/DnsServerPortable.tar.gz"
sha256 = "2e39fb8d0718475790cc025e083a1bcfd837a5e79e4a1d0ed775881bd90287ef"
in_subdir = false
[resources.sources.dotnet] [resources.sources.dotnet]
amd64.url = "https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/9.0.11/aspnetcore-runtime-9.0.11-linux-x64.tar.gz" amd64.url = "https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/10.0.7/aspnetcore-runtime-10.0.7-linux-x64.tar.gz"
amd64.sha256 = "9c72253df8cbdbc775c76d6dcefc057aabb0bf7c978e5c3f24ab0afed839fd1f" amd64.sha256 = "e7371614247bbc481196434d3cc2095e187b569c1929ab5c1af056682f1ca512"
arm64.url = "https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/9.0.11/aspnetcore-runtime-9.0.11-linux-arm64.tar.gz" arm64.url = "https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/10.0.7/aspnetcore-runtime-10.0.7-linux-arm64.tar.gz"
arm64.sha256 = "d039cbb3ef822aad0226857c1d89763c9c2a4bf339015bb11c99a7f6e62d3062" arm64.sha256 = "5c95e878081d8b0476f36ff141a965573cecbc37f2e0555d2374b49d67572b00"
armhf.url = "https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/9.0.11/aspnetcore-runtime-9.0.11-linux-arm.tar.gz" armhf.url = "https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/10.0.7/aspnetcore-runtime-10.0.7-linux-arm.tar.gz"
armhf.sha256 = "6ef6521e262d05302f3e52026d59b8464ae881fc983671c20e3a9e4034d7a99c" armhf.sha256 = "79c4f9fbc5d028c939acb8bdc3899d1e788e2bad032d9a09f22eb21c9a9b8d16"
in_subdir = false
[resources.system_user] [resources.system_user]
+1 -7
View File
@@ -11,30 +11,24 @@ ynh_print_info "Declaring files to be backed up..."
#================================================= #=================================================
# BACKUP THE APP MAIN DIR # BACKUP THE APP MAIN DIR
#================================================= #=================================================
ynh_backup "$install_dir" ynh_backup "$install_dir"
#================================================= #=================================================
# BACKUP THE DATA DIR # BACKUP THE DATA DIR
#================================================= #=================================================
ynh_backup "$data_dir" ynh_backup "$data_dir"
#================================================= #=================================================
# SYSTEM CONFIGURATION # SYSTEM CONFIGURATION
#================================================= #=================================================
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_backup "/etc/logrotate.d/$app"
ynh_backup "/etc/systemd/system/$app.service" ynh_backup "/etc/systemd/system/$app.service"
#================================================= #=================================================
# BACKUP VARIOUS FILES # BACKUP VARIOUS FILES
#================================================= #=================================================
ynh_backup "/var/log/$app"
ynh_backup "/var/log/$app/"
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
+2 -2
View File
@@ -11,7 +11,7 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
ynh_script_progression "Stopping $app's systemd service..." ynh_script_progression "Stopping $app's systemd service..."
ynh_systemctl --service="$app" --action="stop" ynh_systemctl --service="$app" --action="stop" --log_path=systemd --wait_until="was stopped successfully"
#================================================= #=================================================
# MODIFY URL IN NGINX CONF # MODIFY URL IN NGINX CONF
@@ -25,7 +25,7 @@ ynh_config_change_url_nginx
#================================================= #=================================================
ynh_script_progression "Starting $app's systemd service..." ynh_script_progression "Starting $app's systemd service..."
ynh_systemctl --service="$app" --action="start" ynh_systemctl --service="$app" --action="start" --log_path=systemd --wait_until="was started successfully"
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
+16 -8
View File
@@ -11,8 +11,7 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
ynh_script_progression "Setting up source files..." ynh_script_progression "Setting up source files..."
# Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --source_id="prebuilt" --dest_dir="$install_dir/sources"
ynh_setup_source --dest_dir="$install_dir/sources"
ynh_setup_source --source_id="dotnet" --dest_dir="$install_dir/dotnet" ynh_setup_source --source_id="dotnet" --dest_dir="$install_dir/dotnet"
#================================================= #=================================================
@@ -20,23 +19,32 @@ ynh_setup_source --source_id="dotnet" --dest_dir="$install_dir/dotnet"
#================================================= #=================================================
ynh_script_progression "Adding system configurations related to $app..." ynh_script_progression "Adding system configurations related to $app..."
# Create a dedicated NGINX config
ynh_config_add_nginx ynh_config_add_nginx
# Create a dedicated systemd config
ynh_config_add_systemd ynh_config_add_systemd
mkdir -p "/var/log/$app/dns"
chown -R "$app:$app" "/var/log/$app"
yunohost service add "$app" --description="Technitium DNS Server" --log="/var/log/$app/$app.log" --needs_exposed_ports="53" yunohost service add "$app" --description="Technitium DNS Server" --log="/var/log/$app/$app.log" --needs_exposed_ports="53"
# Use logrotate to manage application logfile(s) #=================================================
ynh_config_add_logrotate # ADD A CRON JOB
#=================================================
ynh_config_add --template="logsymlink.cron" --destination="/etc/cron.d/$app"
chmod 644 "/etc/cron.d/$app"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE
#================================================= #=================================================
ynh_script_progression "Starting $app's systemd service..." ynh_script_progression "Starting $app's systemd service..."
# Start a systemd service ynh_systemctl --service="$app" --action="restart" --log_path=systemd --wait_until="was started successfully"
ynh_systemctl --service="$app" --action="start"
#=================================================
# LINK LOGS
#=================================================
ln -sf $(ls -t /var/log/$app/dns/*.log | head -n 1) /var/log/$app/$app.log
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
+1 -6
View File
@@ -16,16 +16,11 @@ if ynh_hide_warnings yunohost service status "$app" >/dev/null; then
yunohost service remove "$app" yunohost service remove "$app"
fi fi
# Remove the dedicated systemd config
ynh_config_remove_systemd ynh_config_remove_systemd
# Remove the app-specific logrotate config
ynh_config_remove_logrotate
# Remove the dedicated NGINX config
ynh_config_remove_nginx ynh_config_remove_nginx
# Remove the log files ynh_safe_rm "/etc/cron.d/$app"
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
+8 -2
View File
@@ -27,18 +27,24 @@ ynh_script_progression "Restoring system configurations related to $app..."
ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore "/var/log/$app"
ynh_restore "/etc/systemd/system/$app.service" ynh_restore "/etc/systemd/system/$app.service"
systemctl enable "$app.service" --quiet systemctl enable "$app.service" --quiet
yunohost service add "$app" --description="Technitium DNS Server" --log="/var/log/$app/$app.log" --needs_exposed_ports=53 yunohost service add "$app" --description="Technitium DNS Server" --log="/var/log/$app/$app.log" --needs_exposed_ports=53
ynh_restore "/etc/logrotate.d/$app" #=================================================
# ADD A CRON JOB
#=================================================
ynh_config_add --template="logsymlink.cron" --destination="/etc/cron.d/$app"
chmod 644 "/etc/cron.d/$app"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE
#================================================= #=================================================
ynh_script_progression "Starting $app's systemd service..." ynh_script_progression "Starting $app's systemd service..."
ynh_systemctl --service="$app" --action="start" ynh_systemctl --service="$app" --action="start" --log_path=systemd --wait_until="was started successfully"
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
+16 -8
View File
@@ -11,7 +11,7 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
ynh_script_progression "Stopping $app's systemd service..." ynh_script_progression "Stopping $app's systemd service..."
ynh_systemctl --service=$app --action="stop" ynh_systemctl --service="$app" --action="stop" --log_path=systemd --wait_until="was stopped successfully"
#================================================= #=================================================
# ENSURE DOWNWARD COMPATIBILITY # ENSURE DOWNWARD COMPATIBILITY
@@ -24,13 +24,20 @@ if [ ! -d "$install_dir/dotnet" ]; then
ynh_safe_rm "/usr/bin/dotnet" ynh_safe_rm "/usr/bin/dotnet"
fi fi
if ynh_app_upgrading_from_version_before_or_equal_to 14.3.0~ynh1; then
mkdir -p "/var/log/$app"
mv "$data_dir/logs" "/var/log/$app/dns"
chown -R "$app:$app" "/var/log/$app"
ln -sf "/var/log/$app/dns" "$data_dir/logs"
ln -sf $(ls -t /var/log/$app/dns/*.log | head -n 1) /var/log/$app/$app.log
fi
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
ynh_script_progression "Upgrading source files..." ynh_script_progression "Upgrading source files..."
# Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --source_id="prebuilt" --dest_dir="$install_dir/sources" --full_replace
ynh_setup_source --dest_dir="$install_dir/sources" --full_replace
ynh_setup_source --source_id="dotnet" --dest_dir="$install_dir/dotnet" --full_replace ynh_setup_source --source_id="dotnet" --dest_dir="$install_dir/dotnet" --full_replace
#================================================= #=================================================
@@ -38,22 +45,23 @@ ynh_setup_source --source_id="dotnet" --dest_dir="$install_dir/dotnet" --full_re
#================================================= #=================================================
ynh_script_progression "Upgrading system configurations related to $app..." ynh_script_progression "Upgrading system configurations related to $app..."
# Create a dedicated NGINX config
ynh_config_add_nginx ynh_config_add_nginx
# Create a dedicated systemd config
ynh_config_add_systemd ynh_config_add_systemd
yunohost service add "$app" --description="Technitium DNS Server" --log="/var/log/$app/$app.log" --needs_exposed_ports=53 yunohost service add "$app" --description="Technitium DNS Server" --log="/var/log/$app/$app.log" --needs_exposed_ports=53
# Use logrotate to manage app-specific logfile(s) #=================================================
ynh_config_add_logrotate # ADD A CRON JOB
#=================================================
ynh_config_add --template="logsymlink.cron" --destination="/etc/cron.d/$app"
chmod 644 "/etc/cron.d/$app"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE
#================================================= #=================================================
ynh_script_progression "Starting $app's systemd service..." ynh_script_progression "Starting $app's systemd service..."
ynh_systemctl --service="$app" --action="start" ynh_systemctl --service="$app" --action="start" --log_path=systemd --wait_until="was started successfully"
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT