On Tue, Jan 9, 2024 at 6:23 PM Andrei Borzenkov <arvidjaar@gmail.com> wrote:
It does not matter as long as you use the full pathname to this script in the service definition.
revisiting this issue, trying to really actually run such a reresolve sh script (bash), but i dont see the endpoint actually being updates through a call of the wg tool. I have checked by shutting down the wg service on the distant side of my situation here (having two places connecting each other via wg) and dynamicdns hostnames (fully qualified domain name in endpoint) i observe the dyndns hostname changing after re-triggering the internet connection on the distant side, updating. but sudo wg show still shows the old dynamic dns ip address on the endpoint output even after many minutes and after an hour still. i would like to debug this situation to detect whats really going on, also I even asked chatgpt (i am a noob :( ) to explain me exactly where and what statement in that bash file does the actual lookup for the domain name, as I find it hard to understand. chatgpt only hallucinates? about awk and host -t ... and getent ahosts host..... but I dont find all these expressions in this bash file from the contrib/reresolve of the wireguard project. unfortunately opensuse doesnt come with this pretty essential? contribution script to make this work for dynamically changing ip addresses on hostnames for endpoints. so: took this as raw:
<https://github.com/WireGuard/wireguard-tools/blob/master/contrib/reresolve-dns/reresolve-dns.sh>
put this into e.g.
/usr/local/bin/share/doc/wireguard-tools/examples/reresolve-dns/
as a file, added root users executable flag (chmod) and acted accordingly to
<https://techoverflow.net/2021/08/19/how-to-automatically-re-resolve-dns-in-wireguard-on-linux/>
the manual way.... I have the .timer file and the .service file put into place
/etc/systemd/system/wg-reresolve-dns@.timer /etc/systemd/system/wg-reresolve-dns@.service
the timer becomes active I can check its state and it calls reguarily the .service file and it seems okay, journalctl shows entries (a lot) for the .timer and for the .service the config file for wireguard is wg0.conf all right in /etc/wireguard/ everything seems simple How would I debug this stuff to actually see how this wg set line gets called and what content of the hostname gets set?
https://github.com/WireGuard/wireguard-tools/blob/13f4ac4cb74b5a833fa7f825ba...
and more importantly I would like to understand where and how that bash script? or what part does actually resolve the dns name of my changing dyndns stuff any hints on how to narrow this? thank you so much for making me learn. would gladly have this contrib script in the official wireguard of opensuse leap? thanks!