Skip to content

Conversation

@burgerga
Copy link
Contributor

@burgerga burgerga commented Oct 31, 2025

✍️ Description

Currently Adguard is listed as updateable, but the only thing it does is msg_error .... Update via the web interface might fail though (happened to me this morning), which is why Adguard has also provided manual instructions. This PR will implement the manual update. It also takes into account that github.com might not resolve anymore after stopping the Adguard service (again, happened to me, as Adguard is my only DNS server :P), so it first installs Adguard into a temporary location, and then stops the service and moves it to the correct location.

🔗 Related PR / Issue

Link: #

✅ Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

@burgerga burgerga requested a review from a team as a code owner October 31, 2025 11:10
@github-actions github-actions bot added feature refactor update script A change that updates a script labels Oct 31, 2025
@burgerga burgerga requested a review from a team as a code owner October 31, 2025 11:22
@github-actions github-actions bot added the json label Oct 31, 2025
CrazyWolf13
CrazyWolf13 previously approved these changes Oct 31, 2025
ct/adguard.sh Outdated
if check_for_gh_release "AdGuardHome" "AdguardTeam/AdGuardHome"; then
read -r -p "It is recommended to update AdGuard Home from the web interface. Would you like to continue with a manual update? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
# After stopping Adguard Home service, github.com might not resolve anymore -> first install into temp location
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove comment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get the dislike for comments, especially if they explain the "why" (which you cannot learn from the code). It will likely prevent a future maintainer running into the same issues. Nevertheless, if it's what you want, I will remove it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that was one of the things we adopted from tteck, maybe if you can shorten it a bit down I'm okay with it, what about other @community-scripts/contributor ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah that's why. He was a single maintainer so probably he remembered all the "why"s ;)
Indeed something for broader discussion, you want to avoid useless comment like

# removing /opt/app
rm -rf /opt/app

but some things you just can't learn from the code, and then they might be useful

@tremor021
Copy link
Member

tremor021 commented Oct 31, 2025

Wait, is Adguard updated via webui?

@burgerga
Copy link
Contributor Author

burgerga commented Oct 31, 2025

@tremor021 Typically, yes. It's a one-click thing, so really convenient. (and it avoids that you have to stop adguard to do a manual update, by which point you might have no DNS anymore)

Explained in the PR: web interface update might fail, see the Adguard website linked in the PR

@CrazyWolf13
Copy link
Member

hmm honestly that's a good point, I've been running adguard since over a year and regularly update without having ever received an error.

If AdGuard recommends update via webUI, so I don't see a reason to add manual update?

@burgerga
Copy link
Contributor Author

burgerga commented Oct 31, 2025

I also had it running (and updating) for over a year, but somehow it failed for me this morning and pointed me to the adguard documentation suggesting to do it manually: https://adguard-dns.io/kb/adguard-home/faq/#manual-update-unix:~:text=If%20the%20button%20isn%E2%80%99t%20displayed%20or%20an%20automatic%20update%20has%20failed%2C%20you%20can%20update%20manually.

But indeed the web update is preferred, hence the note, and the prompt directing people to the web update first

@CrazyWolf13
Copy link
Member

hmm I think then this was rather a result of a faulty update from adguard, maybe?

For me it worked fine and I'm on v0.107.68

@burgerga
Copy link
Contributor Author

Yes, the update from adguard failed (v0.107.67 -> v0.107.69), but no clue why. It just told me to do a manual update, so I thought I would make this process a bit easier.

@CrazyWolf13
Copy link
Member

@burgerga Discussed this interally again, as the tools has it's own update mechanic, this superseed all needs for an update mechanic from our side which would only need additional maintenance.

@CrazyWolf13 CrazyWolf13 closed this Nov 4, 2025
@burgerga
Copy link
Contributor Author

burgerga commented Nov 4, 2025

Yeah, no problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature json refactor update script A change that updates a script

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants