#!/bin/sh
#
# Removes a permanently configured tap device

if [ ! -f .tap ]; then
  echo "No tuntap configured (no .tap)"
  exit 1
fi

TAP=`cat .tap`
tunctl -d $TAP

echo "Removed permanent tap: $TAP"
rm -f .tap
