mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Add ajax delete handler
This commit is contained in:
parent
dc03d9ea00
commit
9bc9f2d3d7
13
ajax/openvpn/del_ovpncfg.php
Normal file
13
ajax/openvpn/del_ovpncfg.php
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require_once '../../includes/config.php';
|
||||||
|
require_once '../../includes/functions.php';
|
||||||
|
|
||||||
|
if (isset($_POST['cfg_id'])) {
|
||||||
|
$ovpncfg_id = $_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);
|
||||||
|
}
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user