I've tried to find similar topic but without help so here's my problem. I have pivpn on remote location, which doesn't have static address and I use duck dns with cron job which updates it's address. I've created client config which I imported in Unraid and then I selected my container to use wg0 network and all of this works perfectly.
Now, here's the problem, when IP address changes my VPN breaks and I need to re-activate VPN in Settings -> VPN Manager. After this action everything resumes to work, but this happens at least once per day. Is there a way to write script which will ping peer endpoint like we have button in Unraid settings and then on failed ping to initiate reconnect?
Thank you all for any help, I'm very new here.