Revision d32cf9d2
Added by Scott Ullrich about 17 years ago
etc/inc/openvpn.inc | ||
---|---|---|
306 | 306 |
$caname = $settings['cipherpki']; |
307 | 307 |
$ovpncapath = $g['varetc_path']."/openvpn/certificates"; |
308 | 308 |
$easyrsapath = $g['easyrsapath']; |
309 |
config_lock(); |
|
309 | 310 |
$fd = fopen($ovpncapath . "/RUNME_2ND", "w"); |
310 | 311 |
fwrite($fd, "cd $ovpncapath \n"); |
311 | 312 |
fwrite($fd, "source $ovpncapath/$caname/vars \n"); |
... | ... | |
317 | 318 |
$config['installedpackages']["openvpn$mode"]['config'][$id]['server.key'] = file_get_contents("$ovpncapath/$caname/server.key"); |
318 | 319 |
$config['installedpackages']["openvpn$mode"]['config'][$id]['server.crt'] = file_get_contents("$ovpncapath/$caname/server.crt"); |
319 | 320 |
$config['installedpackages']["openvpn$mode"]['config'][$id]['dh_params.dh'] = file_get_contents("$ovpncapath/$caname/dh_params.dh"); |
321 |
config_unlock(); |
|
320 | 322 |
write_config(); |
321 | 323 |
log_error("Server certificate for {$settings['description']} created."); |
322 | 324 |
} |
Also available in: Unified diff
Make multi-user friendly and lock config.xml during cert creation.