From 4772a9f7d01892cc8f08d85a0367d8ebc61e9e45 Mon Sep 17 00:00:00 2001 From: David Bentham Date: Fri, 9 Sep 2022 09:40:02 +0100 Subject: [PATCH] vpnc-script: restart dnsmasq when openconnect disconnects Signed-off-by: David Bentham --- net/vpnc-scripts/Makefile | 2 +- net/vpnc-scripts/files/vpnc-script | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/net/vpnc-scripts/Makefile b/net/vpnc-scripts/Makefile index fe239c26ab..fb4e3e2b61 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 685e73d564..772c4a45a1 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" }