$ovpncapath/$caname/serial \n"); fwrite($fd, "source $ovpncapath/$caname/vars \n"); //fwrite($fd, "echo \"Creating Shared Key...\" \n"); //fwrite($fd, "openvpn --genkey --secret $ovpncapath/$caname/shared.key \n"); fwrite($fd, "echo \"Creating CA...\" \n"); fwrite($fd, "$easyrsapath/pkitool --batch --initca $ovpncapath/$caname/ca.crt \n"); fwrite($fd, "echo \"Done!\" \n"); fclose($fd); } else { $input_errors[] = "You should specify a name."; } if (!is_array($config['openvpn']['keys'])) $config['openvpn']['keys'] = array(); $ovpnkeys =& $config['openvpn']['keys']; if (!is_array($ovpnkeys[$caname])) $ovpnkeys[$caname] = array(); } include("head.inc"); ?>