i have that simple Script for netwatch:
Code: Select all
:log error "wireguard-tunnel down: wireguard_s2s_ag";
/interface/wireguard/disable wireguard_s2s_ag;
:delay 4000ms;
/interface/wireguard/enable wireguard_s2s_ag;
:log info "Restart wireguard-tunnel: wireguard_s2s_ag";
Code: Select all
# set variables
:local wg_interface wireguard_s2s_ag;
:log error "wireguard-tunnel down: $wg_interface";
/interface/wireguard/disable $wg_interface;
:delay 4000ms;
/interface/wireguard/enable $wg_interface;
:log info "Restart wireguard-tunnel: $wg_interface";
Wishes
mg