| | |
| | | public function configure_database() |
| | | { |
| | | global $conf; |
| | | |
| | | $cf = $conf['mysql']; // make $conf['mysql'] more accessible |
| | | //** Create the database |
| | | if(!$this->db->query('CREATE DATABASE IF NOT EXISTS '.$cf['database'])) { |
| | |
| | | public function add_database_server_record() { |
| | | |
| | | global $conf; |
| | | |
| | | $cf = $conf['mysql']; // make $conf['mysql'] more accessible |
| | | |
| | | if($cf['host'] == 'localhost') { |
| | |
| | | |
| | | //** writes postfix configuration files |
| | | private function process_postfix_config($configfile) |
| | | { |
| | | { |
| | | global $conf; |
| | | |
| | | $config_dir = $conf['postfix']['config_dir'].'/'; |
| | | $full_file_name = $config_dir.$configfile; |
| | | //* Backup exiting file |
| | |
| | | |
| | | public function configure_jailkit() |
| | | { |
| | | $cf = $conf['jailkit']; |
| | | global $conf; |
| | | |
| | | $cf = $conf['jailkit']; |
| | | $config_dir = $cf['config_dir']; |
| | | $jk_init = $cf['jk_init']; |
| | | $jk_chrootsh = $cf['jk_chrootsh']; |
| | |
| | | if(is_file($conf["postfix"]["config_dir"].'/master.cf')) copy($conf["postfix"]["config_dir"].'/master.cf',$conf["postfix"]["config_dir"].'/master.cf~'); |
| | | $content = rf("tpl/master_cf_amavis.master"); |
| | | // Only add the content if we had not addded it before |
| | | if(!stristr("127.0.0.1:10025 inet n - - - - smtpd",$content)) { |
| | | if(!stristr($content,"127.0.0.1:10025")) { |
| | | af($conf["postfix"]["config_dir"].'/master.cf',$content); |
| | | } |
| | | |
| | |
| | | |
| | | public function configure_getmail() |
| | | { |
| | | global $conf; |
| | | |
| | | $config_dir = $conf['getmail']['config_dir']; |
| | | |
| | | if(!is_dir($config_dir)) exec("mkdir -p ".escapeshellcmd($config_dir)); |
| | |
| | | |
| | | public function configure_apache() |
| | | { |
| | | global $conf; |
| | | |
| | | //* Create the logging directory for the vhost logfiles |
| | | exec('mkdir -p /var/log/ispconfig/httpd'); |
| | | |
| | |
| | | |
| | | $dist_init_scripts = $conf['init_scripts']; |
| | | |
| | | if(is_dir("/etc/Bastille.backup")) caselog("rm -rf /etc/Bastille.backup", __FILE__, __LINE__); |
| | | if(is_dir("/etc/Bastille")) caselog("mv -f /etc/Bastille /etc/Bastille.backup", __FILE__, __LINE__); |
| | | @mkdir("/etc/Bastille", octdec($directory_mode)); |
| | | if(is_dir("/etc/Bastille.backup/firewall.d")) caselog("cp -pfr /etc/Bastille.backup/firewall.d /etc/Bastille/", __FILE__, __LINE__); |