From: David Bentham Date: Fri, 9 Sep 2022 08:40:02 +0000 (+0100) Subject: vpnc-script: restart dnsmasq when openconnect disconnects X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=4772a9f7d01892cc8f08d85a0367d8ebc61e9e45;p=openwrt-packages.git vpnc-script: restart dnsmasq when openconnect disconnects Signed-off-by: David Bentham --- diff --git a/net/vpnc-scripts/Makefile b/net/vpnc-scripts/Makefile index fe239c26a..fb4e3e2b6 100644 --- a/net/vpnc-scripts/Makefile +++ b/net/vpnc-scripts/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=vpnc-scripts PKG_VERSION:=20151220 -PKG_RELEASE:=2 +PKG_RELEASE:=3 include $(INCLUDE_DIR)/package.mk diff --git a/net/vpnc-scripts/files/vpnc-script b/net/vpnc-scripts/files/vpnc-script index 685e73d56..772c4a45a 100755 --- a/net/vpnc-scripts/files/vpnc-script +++ b/net/vpnc-scripts/files/vpnc-script @@ -164,7 +164,11 @@ do_connect() { } do_disconnect() { - rm -f "/tmp/dnsmasq.d/openconnect.$TUNDEV" + if [ -f "/tmp/dnsmasq.d/openconnect.$TUNDEV" ]; then + rm -f "/tmp/dnsmasq.d/openconnect.$TUNDEV" + /etc/init.d/dnsmasq restart + fi + proto_init_update "$TUNDEV" 0 proto_send_update "$INTERFACE" }