#!/bin/sh

# Files
OE_ADMIN_CONF="/etc/oe-admin.conf"

# Script arguments
TUNInterface=$1

# Write TUNInterface to /etc/oe-admin.conf
admin-helper set-config ${OE_ADMIN_CONF} "TUNInterface" "$TUNInterface" " "

# Notify the manager that the VPN is up
/manager vpn_up ${TUNInterface}

# Daemon will monitor vpn status on its own, using TUNInterface from OE_ADMIN_CONF
exit 0
