--- wireguard.orig 2020-03-18 08:23:55.071947000 +0000 +++ wireguard 2020-03-18 09:00:41.711140000 +0000 @@ -21,9 +21,11 @@ name=wireguard rcvar=wireguard_enable +extra_commands="reload" start_cmd="${name}_start" stop_cmd="${name}_stop" +reload_cmd="${name}_reload" wireguard_start() { @@ -31,6 +33,18 @@ for interface in ${wireguard_interfaces}; do /usr/local/bin/wg-quick up ${interface} + done +} + +wireguard_reload() +{ + export WG_QUICK_USERSPACE_IMPLEMENTATION=${wireguard_impl} + + for interface in ${wireguard_interfaces}; do + tmpfile="`mktemp`" + /usr/local/bin/wg-quick strip ${interface} >> ${tmpfile} + /usr/local/bin/wg syncconf ${interface} ${tmpfile} + rm -f ${tmpfile} done }