mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-25 17:10:26 +00:00
14 lines
434 B
PHP
14 lines
434 B
PHP
<?php
|
|
|
|
require '../../includes/csrf.php';
|
|
require_once '../../includes/config.php';
|
|
require_once '../../includes/functions.php';
|
|
|
|
if (isset($_POST['cfg_id'])) {
|
|
$ovpncfg_id = escapeshellcmd($_POST['cfg_id']);
|
|
$ovpncfg_files = pathinfo(RASPI_OPENVPN_CLIENT_LOGIN, PATHINFO_DIRNAME).'/'.$ovpncfg_id.'_*.conf';
|
|
exec("sudo rm $ovpncfg_files", $return);
|
|
$jsonData = ['return'=>$return];
|
|
echo json_encode($jsonData);
|
|
}
|
|
|