Commit cb7f004d authored by Franco Fichtner's avatar Franco Fichtner

openvpn: conf_mount_*() calls are no more

parent fb14dc89
......@@ -42,24 +42,24 @@ global $current_openvpn_version, $current_openvpn_version_rev;
$current_openvpn_version = "2.3.6";
$current_openvpn_version_rev = "01";
function openvpn_client_export_install() {
function openvpn_client_export_install()
{
global $current_openvpn_version;
conf_mount_rw();
$tarpath = "/usr/local/pkg/openvpn-client-export-{$current_openvpn_version}.tgz";
$phpfile = "vpn_openvpn_export.php";
$ovpndir = "/usr/local/share/openvpn";
$workdir = "{$ovpndir}/client-export";
if (!is_dir($workdir))
mkdir($workdir, 0777, true);
@mkdir($workdir, 0777, true);
exec("/usr/bin/tar zxf {$tarpath} -C {$ovpndir}");
conf_mount_ro();
}
function openvpn_client_export_deinstall() {
function openvpn_client_export_deinstall()
{
global $current_openvpn_version;
conf_mount_rw();
$phpfile = "vpn_openvpn_export.php";
$phpfile2 = "vpn_openvpn_export_shared.php";
$ovpndir = "/usr/local/share/openvpn";
......@@ -68,8 +68,8 @@ function openvpn_client_export_deinstall() {
unlink_if_exists("/usr/local/www/{$phpfile}");
unlink_if_exists("/usr/local/www/{$phpfile2}");
unlink_if_exists("/usr/local/pkg/openvpn-client-export-{$current_openvpn_version}.tgz");
exec("/bin/rm -r {$workdir}");
conf_mount_ro();
}
function openvpn_client_export_prefix($srvid, $usrid = null, $crtid = null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment