This script is designed to update AdGuard Home on GL.iNet routers.
It was created by Admon for the GL.iNet community and tested on the MT-6000 (Flint2) with firmware 4.5.8 but works fine on nearly all GL.iNet routers.
Run the script with the following command:
./update-adguardhome.sh [--ignore-free-space]
You can run it without cloning the repository by using the following command:
wget -O update-adguardhome.sh https://raw.githubusercontent.com/Admonstrator/glinet-adguard-updater/main/update-adguardhome.sh && sh update-adguardhome.sh
You can use --ignore-free-space
to ignore the free space check. This is useful for devices with low free space.
In that case there will be no backup of the original files and the script will not check if there is enough free space to download the new files. Could potentially break your router if there is not enough free space. It's not recommended to use this option!
Feel free to provide feedback in the GL.iNet forum.
Since AdGuard Home is deeply integrated into the firmware, it is difficult to revert the changes. Right now there is no automatic way to revert them. Resetting the router to factory settings will NOT revert the changes if you choose to make the installation persistent!
How to revert the changes manually by SSH:
-
Remove the line
/usr/bin/enable-adguardhome-update-check
from/etc/rc.local
. -
Execute
rm /usr/bin/enable-adguardhome-update-check
to remove the script. -
Remove the following lines from
/etc/sysupgrade.conf
:/root/AdGuardHome_backup.tar.gz
/etc/AdGuardHome
/usr/bin/AdGuardHome
/usr/bin/enable-adguardhome-update-check
/etc/rc.local
-
Stop the AdGuard Home service by executing
/etc/init.d/adguardhome stop
. -
Reset the AdGuard Home configuration by executing
rm -rf /etc/AdGuardHome
- this will remove all your settings and blocklists! -
Start the AdGuard Home service by executing
/etc/init.d/adguardhome start
.
A backup of the original files is located in the /root/
folder. The backup is named AdGuardHome_backup.tar.gz
.
If you still encounter issues after doing these steps, you can reset AdGuard Home to its original state by flashing the firmware again.
This script is provided as is and without any warranty. Use it at your own risk.
It's a really early stage and definitely not ready for production use.
It may break your router, your computer, your network or anything else. It may even burn down your house.
You have been warned!