mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 08:34:39 +00:00
openvpn: go full-circle on zip package
We don't need 7z anymore, so it's better to use the lightweight package.
This commit is contained in:
parent
d032a27b74
commit
804d915b8b
4
Makefile
4
Makefile
@ -93,7 +93,6 @@ CORE_DEPENDS?= apinger \
|
||||
openvpn \
|
||||
opnsense-lang \
|
||||
opnsense-update \
|
||||
p7zip \
|
||||
pam_opnsense \
|
||||
pecl-radius \
|
||||
pftop \
|
||||
@ -133,7 +132,8 @@ CORE_DEPENDS?= apinger \
|
||||
suricata \
|
||||
syslogd \
|
||||
unbound \
|
||||
wol
|
||||
wol \
|
||||
zip
|
||||
|
||||
WRKDIR?=${.CURDIR}/work
|
||||
WRKSRC?=${WRKDIR}/src
|
||||
|
||||
@ -370,7 +370,7 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $verifys
|
||||
}
|
||||
}
|
||||
$command = "cd " . escapeshellarg("{$tempdir}/..")
|
||||
. " && /usr/local/bin/7z -tzip -y a "
|
||||
. " && /usr/local/bin/zip -r "
|
||||
. escapeshellarg("/tmp/{$prefix}-config.zip")
|
||||
. " " . escapeshellarg($prefix);
|
||||
exec($command);
|
||||
@ -563,7 +563,7 @@ EOF;
|
||||
exec("cd {$tempdir}/.. && /usr/bin/tar cfz {$outputfile} Viscosity.visc");
|
||||
} else {
|
||||
$outputfile = "/tmp/{$uniq}-Viscosity.visc.zip";
|
||||
exec("cd {$tempdir}/.. && /usr/local/bin/7z -tzip -y a {$outputfile} Viscosity.visc");
|
||||
exec("cd {$tempdir}/.. && /usr/local/bin/zip -r {$outputfile} Viscosity.visc");
|
||||
}
|
||||
|
||||
// Remove temporary directory
|
||||
@ -688,7 +688,7 @@ function openvpn_client_export_sharedkey_config($srvid, $useaddr, $proxy, $zipco
|
||||
file_put_contents("{$tempdir}/{$prefix}.ovpn", $conf);
|
||||
$shkeyfile = "{$tempdir}/{$shkeyfile}";
|
||||
file_put_contents("{$shkeyfile}", base64_decode($settings['shared_key']));
|
||||
exec("cd {$tempdir}/.. && /usr/local/bin/7z -tzip -y a /tmp/{$prefix}-config.zip {$prefix}");
|
||||
exec("cd {$tempdir}/.. && /usr/local/bin/zip -r /tmp/{$prefix}-config.zip {$prefix}");
|
||||
// Remove temporary directory
|
||||
exec("rm -rf {$tempdir}");
|
||||
return "/tmp/{$prefix}-config.zip";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user