diff options
author | Ermal Luçi <eri@pfsense.org> | 2010-03-04 12:14:32 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2010-03-04 12:15:11 +0000 |
commit | 6f27412f5f842a544542b0f0de51c6e8d905ceac (patch) | |
tree | 8da22c9973781aae35d7c13b4d4edbd0ec35a0d3 /etc/inc/openvpn.inc | |
parent | 957e2f1f07201aee484bc66a834679a9d417c585 (diff) | |
download | pfsense-6f27412f5f842a544542b0f0de51c6e8d905ceac.zip pfsense-6f27412f5f842a544542b0f0de51c6e8d905ceac.tar.gz |
Ignore chmod errors for files that do not exist.
Diffstat (limited to 'etc/inc/openvpn.inc')
-rw-r--r-- | etc/inc/openvpn.inc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc index 213932d..c9b4313 100644 --- a/etc/inc/openvpn.inc +++ b/etc/inc/openvpn.inc @@ -256,7 +256,7 @@ function openvpn_add_keyfile(& $data, & $conf, $mode_id, $directive, $opt = "") file_put_contents($fpath, base64_decode($data)); //chown($fpath, 'nobody'); //chgrp($fpath, 'nobody'); - chmod($fpath, 0600); + @chmod($fpath, 0600); $conf .= "{$directive} {$fpath} {$opt}\n"; } @@ -528,10 +528,10 @@ function openvpn_reconfigure($mode,& $settings) { file_put_contents($fpath, $conf); //chown($fpath, 'nobody'); //chgrp($fpath, 'nobody'); - chmod("{$g['varetc_path']}/openvpn/{$mode_id}.conf", 0600); - chmod("{$g['varetc_path']}/openvpn/{$mode_id}.key", 0600); - chmod("{$g['varetc_path']}/openvpn/{$mode_id}.tls-auth", 0600); - chmod("{$g['varetc_path']}/openvpn/{$mode_id}.conf", 0600); + @chmod("{$g['varetc_path']}/openvpn/{$mode_id}.conf", 0600); + @chmod("{$g['varetc_path']}/openvpn/{$mode_id}.key", 0600); + @chmod("{$g['varetc_path']}/openvpn/{$mode_id}.tls-auth", 0600); + @chmod("{$g['varetc_path']}/openvpn/{$mode_id}.conf", 0600); } function openvpn_restart($mode, & $settings) { |