Skip to content

Commit b4c7507

Browse files
committed
Several updaes and bugfixes.
1 parent 18341ee commit b4c7507

File tree

13 files changed

+329
-34
lines changed

13 files changed

+329
-34
lines changed

install/dist/conf/debian40.conf.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
$conf["hostname"] = "server1.example.com"; // Full hostname
66
$conf["ispconfig_install_dir"] = "/usr/local/ispconfig";
77
$conf["ispconfig_config_dir"] = "/usr/local/ispconfig";
8+
$conf["server_id"] = 1;
89

910
/*
1011
Distribution specific settings
@@ -20,6 +21,8 @@
2021
$conf["dist_apache_group"] = "www-data";
2122
$conf["dist_apache_init_script"] = "apache2";
2223
$conf["dist_apache_version"] = "2.2";
24+
$conf["dist_apache_vhost_conf_dir"] = "/etc/apache2/sites-available";
25+
$conf["dist_apache_vhost_conf_enabled_dir"] = "/etc/apache2/sites-enabled";
2326

2427
// Postfix
2528
$conf["dist_postfix_config_dir"] = "/etc/postfix";
@@ -41,6 +44,9 @@
4144
// Amavisd
4245
$conf["dist_amavis_config_dir"] = "/etc/amavis";
4346

47+
// Pureftpd
48+
$conf["dist_pureftpd_config_dir"] = "/etc/pure-ftpd/db";
49+
4450
/*
4551
MySQL Database settings
4652
*/

install/install.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@
9090
swriteln('Configuring Getmail');
9191
$inst->configure_getmail();
9292

93+
// Configure Getmail
94+
swriteln('Configuring Pureftpd');
95+
$inst->configure_pureftpd();
96+
9397
// Configure ISPConfig
9498
swriteln('Installing ISPConfig');
9599
$inst->install_ispconfig();

install/lib/installer_base.lib.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,26 @@ function configure_getmail() {
451451
}
452452

453453

454+
function configure_pureftpd() {
455+
global $conf;
456+
457+
// configure pam for SMTP authentication agains the ispconfig database
458+
$configfile = 'mysql.conf';
459+
if(is_file($conf["dist_pureftpd_config_dir"].'/'.$configfile)) copy($conf["dist_pureftpd_config_dir"].'/'.$configfile,$conf["dist_pureftpd_config_dir"].'/'.$configfile.'~');
460+
if(is_file($conf["dist_pureftpd_config_dir"].'/'.$configfile.'~')) exec('chmod 400 '.$conf["dist_pureftpd_config_dir"].'/'.$configfile.'~');
461+
$content = rf("tpl/pureftpd_".$configfile.".master");
462+
$content = str_replace('{mysql_server_ispconfig_user}',$conf["mysql_server_ispconfig_user"],$content);
463+
$content = str_replace('{mysql_server_ispconfig_password}',$conf["mysql_server_ispconfig_password"],$content);
464+
$content = str_replace('{mysql_server_database}',$conf["mysql_server_database"],$content);
465+
$content = str_replace('{mysql_server_ip}',$conf["mysql_server_ip"],$content);
466+
$content = str_replace('{server_id}',$conf["server_id"],$content);
467+
wf($conf["dist_pureftpd_config_dir"].'/'.$configfile,$content);
468+
exec('chmod 600 '.$conf["dist_pureftpd_config_dir"].'/'.$configfile);
469+
exec('chown root:root '.$conf["dist_pureftpd_config_dir"].'/'.$configfile);
470+
471+
}
472+
473+
454474
function install_ispconfig() {
455475
global $conf;
456476

@@ -495,6 +515,7 @@ function install_ispconfig() {
495515
$content = str_replace('{mysql_server_ispconfig_password}',$conf["mysql_server_ispconfig_password"],$content);
496516
$content = str_replace('{mysql_server_database}',$conf["mysql_server_database"],$content);
497517
$content = str_replace('{mysql_server_host}',$conf["mysql_server_host"],$content);
518+
$content = str_replace('{server_id}',$conf["server_id"],$content);
498519
wf($conf["ispconfig_install_dir"].'/server/lib/'.$configfile,$content);
499520

500521

@@ -517,6 +538,11 @@ function install_ispconfig() {
517538
$command = "chmod +x ".$conf["ispconfig_install_dir"]."/server/scripts/*.sh";
518539
caselog($command." &> /dev/null", __FILE__, __LINE__,"EXECUTED: ".$command,"Failed to execute the command ".$command);
519540

541+
// Copy the ISPConfig vhost for the controlpanel
542+
copy('tpl/apache_ispconfig.vhost.master',$conf["dist_apache_vhost_conf_dir"].'/ispconfig.vhost');
543+
// and create the symlink
544+
exec('ln -s '.$conf["dist_apache_vhost_conf_dir"].'/ispconfig.vhost '.$conf["dist_apache_vhost_conf_enabled_dir"].'/ispconfig.vhost');
545+
520546
}
521547

522548
function install_crontab() {

install/sql/ispconfig3.sql

Lines changed: 111 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
-- http://www.phpmyadmin.net
44
--
55
-- Host: localhost
6-
-- Erstellungszeit: 30. Mai 2007 um 16:57
6+
-- Erstellungszeit: 26. Juni 2007 um 13:47
77
-- Server Version: 5.0.24
88
-- PHP-Version: 5.1.4
99
--
@@ -50,6 +50,8 @@ CREATE TABLE `client` (
5050
`limit_spamfilter_wblist` int(11) NOT NULL default '0',
5151
`limit_spamfilter_user` int(11) NOT NULL default '0',
5252
`limit_spamfilter_policy` int(11) NOT NULL default '0',
53+
`default_webserver` int(11) NOT NULL,
54+
`limit_web_ip` text NOT NULL,
5355
`username` varchar(255) default NULL,
5456
`password` varchar(255) default NULL,
5557
`language` varchar(255) NOT NULL default 'en',
@@ -61,6 +63,7 @@ CREATE TABLE `client` (
6163
-- Daten für Tabelle `client`
6264
--
6365

66+
6467
-- --------------------------------------------------------
6568

6669
--
@@ -123,6 +126,41 @@ CREATE TABLE `dns_soa` (
123126
--
124127

125128

129+
-- --------------------------------------------------------
130+
131+
--
132+
-- Tabellenstruktur für Tabelle `ftp_user`
133+
--
134+
135+
CREATE TABLE `ftp_user` (
136+
`ftp_user_id` bigint(20) NOT NULL auto_increment,
137+
`sys_userid` int(11) NOT NULL default '0',
138+
`sys_groupid` int(11) NOT NULL default '0',
139+
`sys_perm_user` varchar(5) default NULL,
140+
`sys_perm_group` varchar(5) default NULL,
141+
`sys_perm_other` varchar(5) default NULL,
142+
`server_id` int(11) NOT NULL default '0',
143+
`parent_domain_id` int(11) NOT NULL default '0',
144+
`username` varchar(255) default NULL,
145+
`password` varchar(255) default NULL,
146+
`quota_size` int(11) NOT NULL default '-1',
147+
`active` varchar(255) NOT NULL default 'y',
148+
`uid` int(11) NOT NULL default '0',
149+
`gid` int(11) NOT NULL default '0',
150+
`dir` varchar(255) default NULL,
151+
`quota_files` int(11) NOT NULL default '-1',
152+
`ul_ratio` int(11) NOT NULL default '-1',
153+
`dl_ratio` int(11) NOT NULL default '-1',
154+
`ul_bandwidth` int(11) NOT NULL default '-1',
155+
`dl_bandwidth` int(11) NOT NULL default '-1',
156+
PRIMARY KEY (`ftp_user_id`)
157+
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
158+
159+
--
160+
-- Daten für Tabelle `ftp_user`
161+
--
162+
163+
126164
-- --------------------------------------------------------
127165

128166
--
@@ -143,11 +181,13 @@ CREATE TABLE `mail_access` (
143181
`active` enum('n','y') NOT NULL default 'y',
144182
PRIMARY KEY (`access_id`),
145183
KEY `server_id` (`server_id`,`source`)
146-
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
184+
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
147185

148186
--
149187
-- Daten für Tabelle `mail_access`
150188
--
189+
190+
151191
-- --------------------------------------------------------
152192

153193
--
@@ -172,6 +212,7 @@ CREATE TABLE `mail_domain` (
172212
-- Daten für Tabelle `mail_domain`
173213
--
174214

215+
175216
-- --------------------------------------------------------
176217

177218
--
@@ -192,12 +233,13 @@ CREATE TABLE `mail_forwarding` (
192233
`active` enum('y','n') NOT NULL,
193234
PRIMARY KEY (`forwarding_id`),
194235
KEY `server_id` (`server_id`,`source`)
195-
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
236+
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
196237

197238
--
198239
-- Daten für Tabelle `mail_forwarding`
199240
--
200241

242+
201243
-- --------------------------------------------------------
202244

203245
--
@@ -226,6 +268,7 @@ CREATE TABLE `mail_get` (
226268
-- Daten für Tabelle `mail_get`
227269
--
228270

271+
229272
-- --------------------------------------------------------
230273

231274
--
@@ -241,7 +284,7 @@ CREATE TABLE `mail_greylist` (
241284
`origin_type` enum('MANUAL','AUTO') NOT NULL default 'AUTO',
242285
`create_time` datetime NOT NULL default '0000-00-00 00:00:00',
243286
PRIMARY KEY (`greylist_id`)
244-
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
287+
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
245288

246289
--
247290
-- Daten für Tabelle `mail_greylist`
@@ -263,7 +306,7 @@ CREATE TABLE `mail_mailman_domain` (
263306
`mm_user` varchar(50) NOT NULL default '',
264307
`mm_group` varchar(50) NOT NULL default '',
265308
PRIMARY KEY (`mailman_id`,`server_id`,`domain`)
266-
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
309+
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
267310

268311
--
269312
-- Daten für Tabelle `mail_mailman_domain`
@@ -296,7 +339,6 @@ CREATE TABLE `mail_transport` (
296339
--
297340
-- Daten für Tabelle `mail_transport`
298341
--
299-
300342
-- --------------------------------------------------------
301343

302344
--
@@ -321,6 +363,7 @@ CREATE TABLE `mail_user` (
321363
`homedir` varchar(255) NOT NULL,
322364
`autoresponder` enum('n','y') NOT NULL default 'n',
323365
`autoresponder_text` tinytext NOT NULL,
366+
`custom_mailfilter` text,
324367
`postfix` enum('y','n') NOT NULL,
325368
`access` enum('y','n') NOT NULL,
326369
PRIMARY KEY (`mailuser_id`),
@@ -361,7 +404,28 @@ CREATE TABLE `server` (
361404
-- Daten für Tabelle `server`
362405
--
363406

364-
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[mail]\nmodule=postfix_mysql\nmaildir_path=/home/vmail/[domain]/[localpart]/\nhomedir_path=/home/vmail/\nmailuser_uid=5000\nmailuser_gid=5000\n\n[getmail]\ngetmail_config_dir=/etc/getmail\n', 0, 1);
407+
-- --------------------------------------------------------
408+
409+
--
410+
-- Tabellenstruktur für Tabelle `server_ip`
411+
--
412+
413+
CREATE TABLE `server_ip` (
414+
`server_ip_id` bigint(20) NOT NULL auto_increment,
415+
`sys_userid` int(11) NOT NULL default '0',
416+
`sys_groupid` int(11) NOT NULL default '0',
417+
`sys_perm_user` varchar(5) default NULL,
418+
`sys_perm_group` varchar(5) default NULL,
419+
`sys_perm_other` varchar(5) default NULL,
420+
`server_id` int(10) unsigned NOT NULL default '0',
421+
`ip_address` varchar(15) default NULL,
422+
`virtualhost` char(1) NOT NULL default 'y',
423+
PRIMARY KEY (`server_ip_id`)
424+
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
425+
426+
--
427+
-- Daten für Tabelle `server_ip`
428+
--
365429

366430
-- --------------------------------------------------------
367431

@@ -487,7 +551,6 @@ CREATE TABLE `spamfilter_wblist` (
487551

488552
-- --------------------------------------------------------
489553

490-
491554
--
492555
-- Tabellenstruktur für Tabelle `sys_datalog`
493556
--
@@ -530,7 +593,7 @@ CREATE TABLE `sys_dbsync` (
530593
`last_datalog_id` bigint(20) NOT NULL default '0',
531594
PRIMARY KEY (`id`),
532595
KEY `last_datalog_id` (`last_datalog_id`)
533-
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
596+
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
534597

535598
--
536599
-- Daten für Tabelle `sys_dbsync`
@@ -583,7 +646,6 @@ CREATE TABLE `sys_group` (
583646
INSERT INTO `sys_group` (`groupid`, `name`, `description`, `client_id`) VALUES (1, 'admin', 'Administrators group', 0);
584647
INSERT INTO `sys_group` (`groupid`, `name`, `description`, `client_id`) VALUES (2, 'user', 'Users Group', 0);
585648

586-
587649
-- --------------------------------------------------------
588650

589651
--
@@ -615,4 +677,42 @@ CREATE TABLE `sys_user` (
615677
-- Daten für Tabelle `sys_user`
616678
--
617679

618-
INSERT INTO `sys_user` (`userid`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `username`, `passwort`, `modules`, `startmodule`, `app_theme`, `typ`, `active`, `language`, `groups`, `default_group`, `client_id`) VALUES (1, 1, 0, 'riud', 'riud', '', 'admin', '21232f297a57a5a743894a0e4a801fc3', 'admin,client,mail', 'mail', 'default', 'admin', 1, 'en', '1,2', 1, 0);
680+
INSERT INTO `sys_user` (`userid`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `username`, `passwort`, `modules`, `startmodule`, `app_theme`, `typ`, `active`, `language`, `groups`, `default_group`, `client_id`) VALUES (1, 1, 0, 'riud', 'riud', '', 'admin', '21232f297a57a5a743894a0e4a801fc3', 'admin,client,mail,monitor,sites', 'mail', 'default', 'admin', 1, 'en', '1,2', 1, 0);
681+
682+
-- --------------------------------------------------------
683+
684+
--
685+
-- Tabellenstruktur für Tabelle `web_domain`
686+
--
687+
688+
CREATE TABLE `web_domain` (
689+
`domain_id` bigint(20) NOT NULL auto_increment,
690+
`sys_userid` int(11) NOT NULL default '0',
691+
`sys_groupid` int(11) NOT NULL default '0',
692+
`sys_perm_user` varchar(5) default NULL,
693+
`sys_perm_group` varchar(5) default NULL,
694+
`sys_perm_other` varchar(5) default NULL,
695+
`server_id` int(11) NOT NULL default '0',
696+
`ip_address` varchar(15) default NULL,
697+
`domain` varchar(255) default NULL,
698+
`type` varchar(255) NOT NULL default 'y',
699+
`parent_domain_id` int(11) NOT NULL default '0',
700+
`vhost_type` varchar(255) default NULL,
701+
`document_root` varchar(255) default NULL,
702+
`system_user` varchar(255) default NULL,
703+
`system_group` varchar(255) default NULL,
704+
`hd_quota` int(11) NOT NULL default '0',
705+
`traffic_quota` int(11) NOT NULL default '0',
706+
`cgi` varchar(255) NOT NULL default 'y',
707+
`ssi` varchar(255) NOT NULL default 'y',
708+
`suexec` varchar(255) NOT NULL default 'y',
709+
`php` varchar(255) NOT NULL default 'y',
710+
`redirect_type` varchar(255) NOT NULL default 'y',
711+
`redirect_path` varchar(255) default NULL,
712+
`active` varchar(255) NOT NULL default 'y',
713+
PRIMARY KEY (`domain_id`)
714+
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
715+
716+
--
717+
-- Daten für Tabelle `web_domain`
718+
--
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
######################################################
3+
# This virtual host contains the configuration
4+
# for the ISPConfig controlpanel
5+
######################################################
6+
7+
Listen 8080
8+
NameVirtualHost *:8080
9+
10+
<VirtualHost _default_:8080>
11+
ServerAdmin webmaster@localhost
12+
DocumentRoot /usr/local/ispconfig/interface/web/
13+
14+
<IfModule mod_php5.c>
15+
AddType application/x-httpd-php .php
16+
</IfModule>
17+
18+
<Directory /usr/local/ispconfig/interface/web/>
19+
Options FollowSymLinks
20+
AllowOverride None
21+
</Directory>
22+
23+
ErrorLog /var/log/apache2/error.log
24+
CustomLog /var/log/apache2/access.log combined
25+
ServerSignature Off
26+
27+
</VirtualHost>

install/tpl/config.inc.php.master

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ ini_set('register_globals',0);
3535

3636
$conf["app_title"] = "ISPConfig";
3737
$conf["app_version"] = "3.0.0";
38-
$conf["server_id"] = "1";
38+
$conf["server_id"] = "{server_id}";
3939

4040

4141
/*

0 commit comments

Comments
 (0)