From e4225086e1c5a189addf037e9cccdb566374da5f Mon Sep 17 00:00:00 2001 From: billz Date: Tue, 12 Nov 2019 16:02:05 +0000 Subject: [PATCH] Moved DisplayOpenVPNConfig() to new file --- includes/functions.php | 131 ----------------------------------------- 1 file changed, 131 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index fff8cb87..d2aaa083 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -266,137 +266,6 @@ function ConvertToSecurity($security) } } -/** -* -* -*/ -function DisplayOpenVPNConfig() -{ - - exec('cat '. RASPI_OPENVPN_CLIENT_CONFIG, $returnClient); - exec('cat '. RASPI_OPENVPN_SERVER_CONFIG, $returnServer); - exec('pidof openvpn | wc -l', $openvpnstatus); - - if ($openvpnstatus[0] == 0) { - $status = '
OpenVPN is not running -
'; - } else { - $status = '
OpenVPN is running -
'; - } - - // parse client settings - foreach ($returnClient as $a) { - if ($a[0] != "#") { - $arrLine = explode(" ", $a) ; - $arrClientConfig[$arrLine[0]]=$arrLine[1]; - } - } - - // parse server settings - foreach ($returnServer as $a) { - if ($a[0] != "#") { - $arrLine = explode(" ", $a) ; - $arrServerConfig[$arrLine[0]]=$arrLine[1]; - } - } - ?> -
-
-
-
Configure OpenVPN
-
- - - -
-

-
-

Client settings

-
- - -
-
-
- - -
-
-
-
-
- - -
-
-
-
-

Server settings

-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
- - ' , PHP_EOL; - } else { - echo '' , PHP_EOL; - } - ?> - -
-
- -
-
-
-