diff --git a/install/install.php b/install/install.php index 8384d410a842f3dd03a8ffcea72810774a1ee23c..d3b854c20ab3b25ea84ddad9ea55254767bfdf2b 100644 --- a/install/install.php +++ b/install/install.php @@ -124,6 +124,9 @@ if($install_mode == 'Standard') { //* Create the mysql database $inst->configure_database(); + + //* Insert the Server record into the database + $inst->add_database_server_record(); //* Configure postfix $inst->configure_postfix(); @@ -191,12 +194,16 @@ if($install_mode == 'Standard') { }else{ //** Get Server ID - $conf['server_id'] = $inst->free_query('Unique Numeric ID of the server','1'); + // $conf['server_id'] = $inst->free_query('Unique Numeric ID of the server','1'); + // Server ID is an autoInc value of the mysql database now if(strtolower($inst->simple_query('Create Database',array('y','n'),'y')) == 'y') { //* Create the mysql database $inst->configure_database(); system('/etc/init.d/mysql restart'); + + //* Insert the Server record into the database + $inst->add_database_server_record(); } if(strtolower($inst->simple_query('Configure Mail', array('y','n') ,'y') ) == 'y') { diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 4ab9a95ef4d1c12cf3ca6aaa9636ce6fc1b805a5..68b95e87b9bde4e024348f25e58676bec39066fa 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -153,6 +153,17 @@ class installer_base { } } + //** Create a recors in the + public function add_database_server_record() { + + $server_ini = rf("tpl/server.ini.master"); + $server_ini = addslashes($server_ini_content); + + $sql = "INSERT INTO `server` (`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_name`, `mail_server`, `web_server`, `dns_server`, `file_server`, `db_server`, `vserver_server`, `config`, `updated`, `active`) VALUES (1, 1, 'riud', 'riud', 'r', 'Server 1', 1, 1, 1, 1, 1, 1, '$server_ini_content', 0, 1);"; + $this->db->query($sql); + $this->conf['server_id'] = $this->db->insertID(); + } + //** writes postfix configuration files private function process_postfix_config($configfile) diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index 6fd65fccb7fc1c99796f07bfbc02752d34705a03..228c9318300aef67fc0f626d578f7e4bfde6a3f9 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -493,9 +493,6 @@ CREATE TABLE `server` ( -- Daten für Tabelle `server` -- -INSERT INTO `server` (`server_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_name`, `mail_server`, `web_server`, `dns_server`, `file_server`, `db_server`, `vserver_server`, `config`, `updated`, `active`) VALUES -(1, 1, 1, 'riud', 'riud', 'r', 'Server 1', 1, 1, 1, 1, 1, 1, '[global]\nwebserver=apache\nmailserver=postfix\ndnsserver=mydns\n\n[server]\nip_address=192.168.0.105\nnetmask=255.255.255.0\ngateway=192.168.0.1\nhostname=server1.example.com\nnameservers=193.174.32.18,145.253.2.75\n\n[mail]\nmodule=postfix_mysql\nmaildir_path=/home/vmail/[domain]/[localpart]/\nhomedir_path=/home/vmail/\nmailuser_uid=5000\nmailuser_gid=5000\nmailuser_name=vmail\nmailuser_group=vmail\nrelayhost=\nrelayhost_user=\nrelayhost_password=\nmailbox_size_limit=0\nmessage_size_limit=0\n\n[getmail]\ngetmail_config_dir=/etc/getmail\n\n[web]\nwebsite_path=/var/clients/client[client_id]/web[website_id]\nwebsite_symlinks=/var/www/[website_domain]/:/var/clients/client[client_id]/[website_domain]/\nvhost_conf_dir=/etc/apache2/sites-available\nvhost_conf_enabled_dir=/etc/apache2/sites-enabled\n\n', 0, 1); - -- -------------------------------------------------------- -- diff --git a/install/tpl/server.ini.master b/install/tpl/server.ini.master new file mode 100644 index 0000000000000000000000000000000000000000..3ec583e3071d53b2b0f122d847535745da8dee3a --- /dev/null +++ b/install/tpl/server.ini.master @@ -0,0 +1,34 @@ +[global] +webserver=apache +mailserver=postfix +dnsserver=mydns + +[server] +ip_address=192.168.0.105 +netmask=255.255.255.0 +gateway=192.168.0.1 +hostname=server1.example.com +nameservers=193.174.32.18,145.253.2.75 + +[mail] +module=postfix_mysql +maildir_path=/home/vmail/[domain]/[localpart]/ +homedir_path=/home/vmail/ +mailuser_uid=5000 +mailuser_gid=5000 +mailuser_name=vmail +mailuser_group=vmail +relayhost= +relayhost_user= +relayhost_password= +mailbox_size_limit=0 +message_size_limit=0 + +[getmail] +getmail_config_dir=/etc/getmail + +[web] +website_path=/var/clients/client[client_id]/web[website_id] +website_symlinks=/var/www/[website_domain]/:/var/clients/client[client_id]/[website_domain]/ +vhost_conf_dir=/etc/apache2/sites-available +vhost_conf_enabled_dir=/etc/apache2/sites-enabled \ No newline at end of file diff --git a/interface/web/dns/dns_soa_del.php b/interface/web/dns/dns_soa_del.php new file mode 100644 index 0000000000000000000000000000000000000000..5cbb77f79c9424538a94afeba61894f6fc3b8040 --- /dev/null +++ b/interface/web/dns/dns_soa_del.php @@ -0,0 +1,54 @@ +uses("tform_actions"); +$app->tform_actions->onDelete(); + +?> \ No newline at end of file