Comment 40 for bug 1688018

Revision history for this message
Elladan (elladan) wrote :

The script in #37 didn't work for me, as the interface name was "tun0". The following slightly modified script seems to work OK so far:

# cat 99-openconnect-dnsmasq-bug
#!/bin/bash
set -e
# force restart of dnsmasq on vpn connect
# See https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1688018

echo "Running lame bug 1688018 workaround. Args: $*"

if [[ "$1" =~ "tun0" ]] && [ $2 = "up" ]
then
  if [ -e /var/run/NetworkManager/dnsmasq.pid ]
  then
    /bin/kill -15 $(cat /var/run/NetworkManager/dnsmasq.pid)
  fi
fi