#!/bin/sh . /usr/share/shlib.sh version webif export DATE="$(version_get_releasedate '$LastChangedDate: 2008-04-27 18:27:09 +0200 (So, 27. Apr 2008) $')";SCRIPT=${0#/rom} export TITLE="Verwaltung: Gateway-VPN" . ${SCRIPT%/*}/cgi-bin-pre.sh urlquery_cb_crt() { [ -n "$1" ] && httpd -d "$1" > /etc/openvpn/gw-vpn/client.crt; } urlquery_cb_key() { [ -n "$1" ] && httpd -d "$1" > /etc/openvpn/gw-vpn/client.key; } webif_parse_urlquery 'q_' cat<Verwaltung: Gateway-VPN
EOF # # Store changes # if [ -n "$q_save" ]; then if [ "$q_start" = "1" ]; then nvram set ff_gwvpn_start=1 commit >/dev/null 2>/dev/null else nvram set ff_gwvpn_start=0 commit >/dev/null 2>/dev/null fi /etc/init.d/S??openvpn restart >/dev/null 2>/dev/null echo "
Die Einstellungen wurden gespeichert und sind sofort aktiv.


" fi if grep -q 'gwvpn:' /proc/net/dev; then echo '
Status der VPN Schnittstelle:
'
	ifconfig gwvpn
	echo '

' else echo '
VPN ist nicht aktiv!

' fi cat<
Gateway-VPN aktivieren

Zertifikat (.crt):


Schlüssel (.key):


EOF . ${SCRIPT%/*}/cgi-bin-post.sh