Yesterday, 07:12
You can create a scheduled script that tries to connect to a known IP/port over WG.
WG service is restarted if the connection cannot be established.
WG service is restarted if the connection cannot be established.
Code:
require('socket')
sock = socket.tcp()
sock:settimeout(5)
res, err = sock:connect('192.168.1.1', 443)
sock:close()
if not res then
log('wg error', err)
os.execute('/etc/init.d/wireguard-lm restart')
end