Script: Update AdGuard Home

After the last update of the script, I can no longer install it in OpenWRT:

From the error itself, I would suggest to install curl: opkg install curl

@admon I wouldn’t use wget in the help and curl in the script. By reading the script, in line 116 both could be used.
If get is already on the base image this would prevent to check for dependencies within the script.

If the filename is the same remote and local, you even could remove -O in wget.

What router model you tried to update adguard home?

curl and wget are quite different and the curl version on the GL routers don’t support something, that I needed. Both should be installed by default anyway.

People running scripts should be able to read error messages and fix dependencies. If they are not, that should not run scripts. :sweat_smile:

The script was never designed for running it on plain OpenWrt.

@admon I understand you don’t support alternative forks. However, if you changed your mindset, it would help a lot of people, as it is also not possible to update AdguardHome directly from OpenWRT.

@LupusE Thanks for the advice, it worked perfectly! :slight_smile:

@slesar MT6000 with openwrt snapshot

Problay not using gl inet interface? That’s different. @admon made script only official gl inet interface because he made correct address files for default gl inet

So you could follow my alternative instruction :+1:t2:

In that case, the people maintaining the AdGuard Home package within OpenWrt should fix this.
They only need to remove --no-check-update from the init script. o_O

So mostly executing this should help you

sed -i '/procd_set_param command \/usr\/bin\/AdGuardHome/ s/--no-check-update //' "/etc/init.d/adguardhome"
1 Like

totally new to open-wrt and gL.iNet as a whole, how long until this gets fixed do you guys think?

read through the thread and there’s no way I could pull off a workaround…

Personally, I don’t think this will be fixed at all. It’s not a bug. AGH will certainly receive an update in the GL firmware at some point - but the workaround is, in my opinion, the best solution.

(The workaround is to use the script. See 1st post here)

1 Like

It’s not enough to just remove the line. It looks like there is something in OpenWRT that prevents Adguardhome from updating automatically and your script fixed this somehow:

Adguardhome

You should report this to the AGH team or the OpenWrt team then - they need to figure out what’s going on.

Thanks, I’ll report back! :slight_smile:

Hi Admon,

I really admire your scripts. I don’t want to criticize them or your style. I just try to give a external view point.
I have to admit I even don’t know the differences in the embedded versions. But from my little knowledge about scripting, I know most function is portable.

$ echo “$(curl -shttps://raw.githubusercontent.com/Admonstrator/glinet.forum/main/scripts/update-adguardhome/update-adguardhome.sh” | grep -o 'SCRIPT_VERSION=”[0-9]{4}.[0-9]{2}.[0-9]{2}.[0-9]{2}“’ | cut -d '”’ -f 2 || echo “Failed to retrieve script version”)"
2024.04.14.01
$ curl -o update-adguardhome.sh https://raw.githubusercontent.com/Admonstrator/glinet.forum/main/scripts/update-adguardhome/update-adguardhome.sh && sh update-adguardhome.sh

$ echo “$(wget --output-document - -qhttps://raw.githubusercontent.com/Admonstrator/glinet.forum/main/scripts/update-adguardhome/update-adguardhome.sh” | grep -o 'SCRIPT_VERSION=”[0-9]{4}.[0-9]{2}.[0-9]{2}.[0-9]{2}“’ | cut -d '”’ -f 2 || echo “Failed to retrieve script version”)"
2024.04.14.01
$ wget https://raw.githubusercontent.com/Admonstrator/glinet.forum/main/scripts/update-adguardhome/update-adguardhome.sh && sh update-adguardhome.sh

And I know many programmer and scripter are exchange them unintentionally. So I want to mention it (with details for future reference). If you are using it or not, its up to you.

All fine, I might consider it next time I rework this script.

I just remember that there was an issue with curl somehow, not sure why. But I will look into it when I do a rework. :+1:t2:

2 Likes

When there is an update on the script, should I run it again on GL-iNet devices?
I noticed some updates on the last days/weeks, but I ran the script 1 month ago.

By the way, on the Readme (Feedback session), the link is going to Tailscale post on GL-iNet forum and not this post.

Yep, you should always use the newest version. Since a few versions, there is an auto-updater onboard.

1 Like

Great work, just updated ! Thank you.

This process should be running?

If you use AGH, this should be running because it’s … well … the AGH binary?

1 Like

I’m discovering my ax3000 a little,
and I don’t see any button to update adguard home
in the admin panel (http interface…)
sincerely by purchasing this material, I saw wrt
and I thought the GUI would be more complete…
like support for advanced uninstallation,
like update button,
see GUI for torrent…
in short I didn’t think I found myself in the Linux command line in ssh…
I had a dwrt router, and didn’t have to do this…