vpnc-script-detect-disconnect 477 B

123456789101112131415
  1. #!/bin/sh -x
  2. # Fake script just for unit tests. Do not use.
  3. # For a real one, see https://www.infradead.org/openconnect/vpnc-script.html
  4. if [ "$reason" = "connect" ]; then
  5. ip link set dev "$TUNDEV" up mtu "$INTERNAL_IP4_MTU"
  6. ip addr add "$INTERNAL_IP4_ADDRESS/32" peer "$INTERNAL_IP4_ADDRESS" dev "$TUNDEV"
  7. ip -6 addr add $INTERNAL_IP6_NETMASK dev $TUNDEV
  8. rm -f ${DISCONNECT_FILE}
  9. elif [ "$reason" = "disconnect" ];then
  10. touch ${DISCONNECT_FILE}
  11. fi
  12. exit 0