From 95aaa702ee604103328f6a45bc1a5ad78b151aaa Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Wed, 2 Nov 2011 14:26:02 -0400 Subject: Correct path to binary --- config/openvpn-client-export/openvpn-client-export.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/openvpn-client-export/openvpn-client-export.inc b/config/openvpn-client-export/openvpn-client-export.inc index 0223a7ef..cd436929 100755 --- a/config/openvpn-client-export/openvpn-client-export.inc +++ b/config/openvpn-client-export/openvpn-client-export.inc @@ -639,7 +639,10 @@ function openvpn_client_export_sharedkey_config($srvid, $useaddr, $proxy, $zipco $shkeyfile = "{$tempdir}/{$shkeyfile}"; file_put_contents("{$shkeyfile}", base64_decode($settings['shared_key'])); - exec("cd {$tempdir}/.. && /usr/local/bin/zip -r {$g['tmp_path']}/{$prefix}-config.zip {$prefix}"); + if(file_exists("/usr/pbi/zip-{$uname_p}/bin/zip")) + exec("cd {$tempdir}/.. && /usr/pbi/zip-{$uname_p}/bin/zip -r {$g['tmp_path']}/{$prefix}-config.zip {$prefix}"); + else + exec("cd {$tempdir}/.. && /usr/local/bin/zip -r {$g['tmp_path']}/{$prefix}-config.zip {$prefix}"); // Remove temporary directory exec("rm -rf {$tempdir}"); -- cgit v1.2.3