Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NextDNS package not reinstalled on UDM/UXP firmware upgrade #913

Open
jasonwaters opened this issue Feb 21, 2024 · 15 comments
Open

NextDNS package not reinstalled on UDM/UXP firmware upgrade #913

jasonwaters opened this issue Feb 21, 2024 · 15 comments
Labels
✨ feature-request New feature or request

Comments

@jasonwaters
Copy link

nextdns is uninstalled from my unifi os (Dream Machine Pro) on every update. I have boot scripts that run on each boot to re-configure things after this happens. I'd like to add to those scripts the install command `sh -c 'sh -c "$(curl -sL https://nextdns.io/install)"'. But this script requires user interaction. I'd like a way to run it in silent mode without the need for user interaction. I have subsequent commands to configure nextdns in my boot script.

@jasonwaters jasonwaters added the ✨ feature-request New feature or request label Feb 21, 2024
@rs
Copy link
Contributor

rs commented Mar 3, 2024

Not against the idea, however, if you have a way to persist a boot script over firmware updates while the nextdns package does not, it would be better to exploit this to automatically restore the package. Can you provide more details about how you maintain those boot scripts active?

@jasonwaters
Copy link
Author

I use the Unifi OS utilities boot script.

https://github.com/unifi-utilities/unifios-utilities/blob/main/on-boot-script/README.md

From the readme it states, the script…

Persists through reboot and firmware updates! It is able to do this because Ubiquiti caches all debian package installs on the UDM in /data, then re-installs them on reset of unifi-os container

So maybe you are on the right track in your thinking. Either way, the goal is to either be able to keep Nextdns installed between updates, or reinstall it immediately after an update on boot.

@rs
Copy link
Contributor

rs commented Mar 3, 2024

Apparently they have the same problem with 3.x and upgrades. Are you sure your boot scripts are surviving upgrades? Once they find a solution, we can port it.

@jasonwaters
Copy link
Author

And here I thought my on-boot scripts were working fine. Turns out the udm-boot service was in fact not working either.

I have a few scripts in /data/on_boot.d that are set to run in sequence by the udm-boot service. But since nextdns was not-installed anymore I'd ssh in and manually execute each script after re-installing nextdns. In doing so I assumed udm-boot was doing it's job but failing (due to nextdns no longer installed) when in reality it was also not working. All the while, my system was running fine since i was manually invoking those scripts each time. 🙃

Hopefully a solution is reached on that thread. I was able to get udm-boot working again by following these steps unifi-utilities/unifios-utilities#523 (comment) but not sure it will survive firmware upgrades. I'll have to wait and see.

@rojomisin
Copy link

I'd like this for the use-case of cloud vm exit-node provisioning

@phaelium
Copy link

I'd love to do this as well. I'd like to initiate the re-install from node-red via ssh, and if it's already installed then it could just exit. The config files are always still around, it's just the program itself gets removed. Once it's reinstalled it works fine with no changes.

Maybe like a sh -c 'sh -c "$(curl -sL https://nextdns.io/install-unattended"' or something?

@ChrisColotti
Copy link

ChrisColotti commented Mar 15, 2024

Yes I am seeing this too and as often as the UDM firmware comes out remembering to re-install the package is a bit cumbersome. Sounds like so far there is not a resolution? The Control-D folks said without a doubt their install persists but I have not tried/tested it. I have been a loyal NextDNS user since the start and don't like to change just to change products.

I would like to see this just "fix itself" after a firmware upgrade, b/c I have no other scripts running after updates. This is the only add on I need to maintain after an upgrade.

@rs
Copy link
Contributor

rs commented Mar 15, 2024

I’m not aware of a solution. If you find something working, let me know so I can implement it.

@phaelium
Copy link

Well, for my use case I just need the script to run without asking the user to press 'i'. Once it installs, the config files are not removed when UDM re-images, it's just the install files, so it works right away. I usually just ctrl-break out of the config wizard.

So i suppose just some sort of way to tell the install to bypass the initial screen asking you to enter 'i' would be worth a shot?

@rs
Copy link
Contributor

rs commented Mar 16, 2024

You can just reinstall the apt package (or restore it). You don’t need to run the installer.

@phaelium
Copy link

You can just reinstall the apt package (or restore it). You don’t need to run the installer.

I..... can't believe I didn't think of that haha. Ok, next UDM update I'll give that a shot.

@rs rs changed the title Ability to execute install script without user interaction NextDNS package not reinstalled on UDM/UXP firmware upgrade Mar 29, 2024
@macflyhub
Copy link

I just discovered my UXG had secretly done an update and removed NextDNS. Not sure how I can even auto detect that its been removed. Need persistence!

@bondskin
Copy link

I just discovered my UXG had secretly done an update and removed NextDNS. Not sure how I can even auto detect that its been removed. Need persistence!

not "secretly" but you have activated "automatic updates".

@rweijnen
Copy link

https://github.com/unifi-utilities/unifios-utilities/tree/main/on-boot-script-2.x
This does persist on firmware updates, is there a way for NextDNS to leverage it (in my case for Unifi Cloud Gateway Ultra)?

@rs
Copy link
Contributor

rs commented May 24, 2024

This project is using the same technique as our installer and has likely the same issue on firmware upgrade since recent firmwares.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants