Templatized Tor proxy config

This commit is contained in:
billz
2019-11-12 21:05:21 +00:00
parent ef2286152a
commit 25d1ddeed6
4 changed files with 191 additions and 178 deletions

View File

@@ -33,5 +33,32 @@ function DisplayOpenVPNConfig()
"status",
"openvpnStatus"
));
}
/**
*
*
*/
function SaveOpenVPNConfig()
{
if (isset($_POST['SaveOpenVPNSettings'])) {
// TODO
} elseif (isset($_POST['StartOpenVPN'])) {
echo "Attempting to start openvpn";
exec('sudo systemctl start openvpn.service', $return);
foreach ($return as $line) {
$status->addMessage($line, 'info');
}
} elseif (isset($_POST['StopOpenVPN'])) {
echo "Attempting to stop openvpn";
exec('sudo systemctl stop openvpn.service', $return);
foreach ($return as $line) {
$status->addMessage($line, 'info');
}
}
}
?>