-
-
Save Westie/5557cffd927dd32de93255e5ac4a22e0 to your computer and use it in GitHub Desktop.
Fix wireguard + DNS issues with opnsense
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
SOURCE_PATH=$(realpath $0); | |
if [ -z "${SOURCE_PATH}" ]; then | |
exit 1 | |
fi | |
run_delay () { | |
sh -c "(sleep 60 && ${SOURCE_PATH} fix) > /dev/null" & | |
} | |
run_fix () { | |
/usr/local/etc/rc.filter_configure | |
/usr/local/sbin/pluginctl -s unbound restart | |
/usr/local/sbin/pluginctl -s dnsmasq restart | |
/usr/local/sbin/pluginctl -s dhcpd restart | |
} | |
if [ -z "${1}" ]; then | |
run_delay | |
elif [ ! -z "${1}" -a "${1}" == "fix" ]; then | |
run_fix | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This will need to go in
/usr/local/etc/rc.syshook.d/start/99-reload-rules
or similar