aboutsummaryrefslogtreecommitdiffstats
path: root/config/openvpn-client-export/openvpn-client-export.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@gmail.com>2011-11-02 14:26:02 -0400
committerScott Ullrich <sullrich@gmail.com>2011-11-02 14:26:02 -0400
commit95aaa702ee604103328f6a45bc1a5ad78b151aaa (patch)
tree95c314dc6076379db9dc245bfdaa0886495894ec /config/openvpn-client-export/openvpn-client-export.inc
parent775dd7ab660486ab2d8fafa06622ef7fd9af1078 (diff)
downloadpfsense-packages-95aaa702ee604103328f6a45bc1a5ad78b151aaa.tar.gz
pfsense-packages-95aaa702ee604103328f6a45bc1a5ad78b151aaa.tar.bz2
pfsense-packages-95aaa702ee604103328f6a45bc1a5ad78b151aaa.zip
Correct path to binary
Diffstat (limited to 'config/openvpn-client-export/openvpn-client-export.inc')
-rwxr-xr-xconfig/openvpn-client-export/openvpn-client-export.inc5
1 files changed, 4 insertions, 1 deletions
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}");