Hi
I used the neat wireguard-watchdog script before to reconnect a remote wireguard peer (router in site-to-site configuration) as during power outages and reboots of the main router caused a need for a reboot of the remote router to re-establish the wireguard tunnel. The wireguard watchdog script completely removed the need for those reboots. But now I get a lot of errors that I didn't get in the 19.07 installation.
I just migrated from 19.07 to 22.03.3. I made a fresh install not using any sysupgrade.
In the Scheduled tasks tab I entered the same wireguard-watchdog line as I had in 19.07 and the same that is in the comments of the /usr/bin/wireguard_watchdog
file.
These are the wireguard and related opkg packages I have installed.
kmod-wireguard - 5.10.161-1
luci-app-wireguard - git-23.018.72712-6d712c3
luci-proto-wireguard - git-22.327.45657-14403fe
wireguard-tools - 1.0.20210424-3
This is the contents of /etc/crontabs/root
:
* * * * * /usr/bin/wireguard_watchdog
In the System logs i get a lot of those cron job errors for wireguard-watchdog.
Wed Feb 1 23:38:00 2023 cron.err crond[2625]: USER root pid 9098 cmd /usr/bin/wireguard_watchdog
Wed Feb 1 23:39:00 2023 cron.err crond[2625]: USER root pid 9121 cmd /usr/bin/wireguard_watchdog
Wed Feb 1 23:40:00 2023 cron.err crond[2625]: USER root pid 9145 cmd /usr/bin/wireguard_watchdog
Wed Feb 1 23:41:00 2023 cron.err crond[2625]: USER root pid 9168 cmd /usr/bin/wireguard_watchdog
Wed Feb 1 23:42:00 2023 cron.err crond[2625]: USER root pid 9192 cmd /usr/bin/wireguard_watchdog
Wed Feb 1 23:43:00 2023 cron.err crond[2625]: USER root pid 9215 cmd /usr/bin/wireguard_watchdog
Wed Feb 1 23:44:00 2023 cron.err crond[2625]: USER root pid 9238 cmd /usr/bin/wireguard_watchdog
Wed Feb 1 23:45:00 2023 cron.err crond[2625]: USER root pid 9261 cmd /usr/bin/wireguard_watchdog
Wed Feb 1 23:46:00 2023 cron.err crond[2625]: USER root pid 9284 cmd /usr/bin/wireguard_watchdog
Here is the contents of /usr/bin/wireguard_watchdog
:
https://pastebin.com/81NBaXYD
The script has execute permissions:
-rwxr-xr-x 1 root root 2780 Feb 8 2022 wireguard_watchdog