Commit b4c75070 authored by tbrehm's avatar tbrehm

Several updaes and bugfixes.

parent 18341ee3
...@@ -5,6 +5,7 @@ $conf["distname"] = "debian40"; ...@@ -5,6 +5,7 @@ $conf["distname"] = "debian40";
$conf["hostname"] = "server1.example.com"; // Full hostname $conf["hostname"] = "server1.example.com"; // Full hostname
$conf["ispconfig_install_dir"] = "/usr/local/ispconfig"; $conf["ispconfig_install_dir"] = "/usr/local/ispconfig";
$conf["ispconfig_config_dir"] = "/usr/local/ispconfig"; $conf["ispconfig_config_dir"] = "/usr/local/ispconfig";
$conf["server_id"] = 1;
/* /*
Distribution specific settings Distribution specific settings
...@@ -20,6 +21,8 @@ $conf["dist_apache_user"] = "www-data"; ...@@ -20,6 +21,8 @@ $conf["dist_apache_user"] = "www-data";
$conf["dist_apache_group"] = "www-data"; $conf["dist_apache_group"] = "www-data";
$conf["dist_apache_init_script"] = "apache2"; $conf["dist_apache_init_script"] = "apache2";
$conf["dist_apache_version"] = "2.2"; $conf["dist_apache_version"] = "2.2";
$conf["dist_apache_vhost_conf_dir"] = "/etc/apache2/sites-available";
$conf["dist_apache_vhost_conf_enabled_dir"] = "/etc/apache2/sites-enabled";
// Postfix // Postfix
$conf["dist_postfix_config_dir"] = "/etc/postfix"; $conf["dist_postfix_config_dir"] = "/etc/postfix";
...@@ -41,6 +44,9 @@ $conf["dist_courier_config_dir"] = "/etc/courier"; ...@@ -41,6 +44,9 @@ $conf["dist_courier_config_dir"] = "/etc/courier";
// Amavisd // Amavisd
$conf["dist_amavis_config_dir"] = "/etc/amavis"; $conf["dist_amavis_config_dir"] = "/etc/amavis";
// Pureftpd
$conf["dist_pureftpd_config_dir"] = "/etc/pure-ftpd/db";
/* /*
MySQL Database settings MySQL Database settings
*/ */
......
...@@ -90,6 +90,10 @@ $inst->configure_amavis(); ...@@ -90,6 +90,10 @@ $inst->configure_amavis();
swriteln('Configuring Getmail'); swriteln('Configuring Getmail');
$inst->configure_getmail(); $inst->configure_getmail();
// Configure Getmail
swriteln('Configuring Pureftpd');
$inst->configure_pureftpd();
// Configure ISPConfig // Configure ISPConfig
swriteln('Installing ISPConfig'); swriteln('Installing ISPConfig');
$inst->install_ispconfig(); $inst->install_ispconfig();
......
...@@ -451,6 +451,26 @@ maildrop unix - n n - - pipe ...@@ -451,6 +451,26 @@ maildrop unix - n n - - pipe
} }
function configure_pureftpd() {
global $conf;
// configure pam for SMTP authentication agains the ispconfig database
$configfile = 'mysql.conf';
if(is_file($conf["dist_pureftpd_config_dir"].'/'.$configfile)) copy($conf["dist_pureftpd_config_dir"].'/'.$configfile,$conf["dist_pureftpd_config_dir"].'/'.$configfile.'~');
if(is_file($conf["dist_pureftpd_config_dir"].'/'.$configfile.'~')) exec('chmod 400 '.$conf["dist_pureftpd_config_dir"].'/'.$configfile.'~');
$content = rf("tpl/pureftpd_".$configfile.".master");
$content = str_replace('{mysql_server_ispconfig_user}',$conf["mysql_server_ispconfig_user"],$content);
$content = str_replace('{mysql_server_ispconfig_password}',$conf["mysql_server_ispconfig_password"],$content);
$content = str_replace('{mysql_server_database}',$conf["mysql_server_database"],$content);
$content = str_replace('{mysql_server_ip}',$conf["mysql_server_ip"],$content);
$content = str_replace('{server_id}',$conf["server_id"],$content);
wf($conf["dist_pureftpd_config_dir"].'/'.$configfile,$content);
exec('chmod 600 '.$conf["dist_pureftpd_config_dir"].'/'.$configfile);
exec('chown root:root '.$conf["dist_pureftpd_config_dir"].'/'.$configfile);
}
function install_ispconfig() { function install_ispconfig() {
global $conf; global $conf;
...@@ -495,6 +515,7 @@ maildrop unix - n n - - pipe ...@@ -495,6 +515,7 @@ maildrop unix - n n - - pipe
$content = str_replace('{mysql_server_ispconfig_password}',$conf["mysql_server_ispconfig_password"],$content); $content = str_replace('{mysql_server_ispconfig_password}',$conf["mysql_server_ispconfig_password"],$content);
$content = str_replace('{mysql_server_database}',$conf["mysql_server_database"],$content); $content = str_replace('{mysql_server_database}',$conf["mysql_server_database"],$content);
$content = str_replace('{mysql_server_host}',$conf["mysql_server_host"],$content); $content = str_replace('{mysql_server_host}',$conf["mysql_server_host"],$content);
$content = str_replace('{server_id}',$conf["server_id"],$content);
wf($conf["ispconfig_install_dir"].'/server/lib/'.$configfile,$content); wf($conf["ispconfig_install_dir"].'/server/lib/'.$configfile,$content);
...@@ -517,6 +538,11 @@ maildrop unix - n n - - pipe ...@@ -517,6 +538,11 @@ maildrop unix - n n - - pipe
$command = "chmod +x ".$conf["ispconfig_install_dir"]."/server/scripts/*.sh"; $command = "chmod +x ".$conf["ispconfig_install_dir"]."/server/scripts/*.sh";
caselog($command." &> /dev/null", __FILE__, __LINE__,"EXECUTED: ".$command,"Failed to execute the command ".$command); caselog($command." &> /dev/null", __FILE__, __LINE__,"EXECUTED: ".$command,"Failed to execute the command ".$command);
// Copy the ISPConfig vhost for the controlpanel
copy('tpl/apache_ispconfig.vhost.master',$conf["dist_apache_vhost_conf_dir"].'/ispconfig.vhost');
// and create the symlink
exec('ln -s '.$conf["dist_apache_vhost_conf_dir"].'/ispconfig.vhost '.$conf["dist_apache_vhost_conf_enabled_dir"].'/ispconfig.vhost');
} }
function install_crontab() { function install_crontab() {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
-- http://www.phpmyadmin.net -- http://www.phpmyadmin.net
-- --
-- Host: localhost -- Host: localhost
-- Erstellungszeit: 30. Mai 2007 um 16:57 -- Erstellungszeit: 26. Juni 2007 um 13:47
-- Server Version: 5.0.24 -- Server Version: 5.0.24
-- PHP-Version: 5.1.4 -- PHP-Version: 5.1.4
-- --
...@@ -50,6 +50,8 @@ CREATE TABLE `client` ( ...@@ -50,6 +50,8 @@ CREATE TABLE `client` (
`limit_spamfilter_wblist` int(11) NOT NULL default '0', `limit_spamfilter_wblist` int(11) NOT NULL default '0',
`limit_spamfilter_user` int(11) NOT NULL default '0', `limit_spamfilter_user` int(11) NOT NULL default '0',
`limit_spamfilter_policy` int(11) NOT NULL default '0', `limit_spamfilter_policy` int(11) NOT NULL default '0',
`default_webserver` int(11) NOT NULL,
`limit_web_ip` text NOT NULL,
`username` varchar(255) default NULL, `username` varchar(255) default NULL,
`password` varchar(255) default NULL, `password` varchar(255) default NULL,
`language` varchar(255) NOT NULL default 'en', `language` varchar(255) NOT NULL default 'en',
...@@ -61,6 +63,7 @@ CREATE TABLE `client` ( ...@@ -61,6 +63,7 @@ CREATE TABLE `client` (
-- Daten für Tabelle `client` -- Daten für Tabelle `client`
-- --
-- -------------------------------------------------------- -- --------------------------------------------------------
-- --
...@@ -123,6 +126,41 @@ CREATE TABLE `dns_soa` ( ...@@ -123,6 +126,41 @@ CREATE TABLE `dns_soa` (
-- --
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `ftp_user`
--
CREATE TABLE `ftp_user` (
`ftp_user_id` bigint(20) NOT NULL auto_increment,
`sys_userid` int(11) NOT NULL default '0',
`sys_groupid` int(11) NOT NULL default '0',
`sys_perm_user` varchar(5) default NULL,
`sys_perm_group` varchar(5) default NULL,
`sys_perm_other` varchar(5) default NULL,
`server_id` int(11) NOT NULL default '0',
`parent_domain_id` int(11) NOT NULL default '0',
`username` varchar(255) default NULL,
`password` varchar(255) default NULL,
`quota_size` int(11) NOT NULL default '-1',
`active` varchar(255) NOT NULL default 'y',
`uid` int(11) NOT NULL default '0',
`gid` int(11) NOT NULL default '0',
`dir` varchar(255) default NULL,
`quota_files` int(11) NOT NULL default '-1',
`ul_ratio` int(11) NOT NULL default '-1',
`dl_ratio` int(11) NOT NULL default '-1',
`ul_bandwidth` int(11) NOT NULL default '-1',
`dl_bandwidth` int(11) NOT NULL default '-1',
PRIMARY KEY (`ftp_user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
--
-- Daten für Tabelle `ftp_user`
--
-- -------------------------------------------------------- -- --------------------------------------------------------
-- --
...@@ -143,11 +181,13 @@ CREATE TABLE `mail_access` ( ...@@ -143,11 +181,13 @@ CREATE TABLE `mail_access` (
`active` enum('n','y') NOT NULL default 'y', `active` enum('n','y') NOT NULL default 'y',
PRIMARY KEY (`access_id`), PRIMARY KEY (`access_id`),
KEY `server_id` (`server_id`,`source`) KEY `server_id` (`server_id`,`source`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ; ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --
-- Daten für Tabelle `mail_access` -- Daten für Tabelle `mail_access`
-- --
-- -------------------------------------------------------- -- --------------------------------------------------------
-- --
...@@ -172,6 +212,7 @@ CREATE TABLE `mail_domain` ( ...@@ -172,6 +212,7 @@ CREATE TABLE `mail_domain` (
-- Daten für Tabelle `mail_domain` -- Daten für Tabelle `mail_domain`
-- --
-- -------------------------------------------------------- -- --------------------------------------------------------
-- --
...@@ -192,12 +233,13 @@ CREATE TABLE `mail_forwarding` ( ...@@ -192,12 +233,13 @@ CREATE TABLE `mail_forwarding` (
`active` enum('y','n') NOT NULL, `active` enum('y','n') NOT NULL,
PRIMARY KEY (`forwarding_id`), PRIMARY KEY (`forwarding_id`),
KEY `server_id` (`server_id`,`source`) KEY `server_id` (`server_id`,`source`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ; ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --
-- Daten für Tabelle `mail_forwarding` -- Daten für Tabelle `mail_forwarding`
-- --
-- -------------------------------------------------------- -- --------------------------------------------------------
-- --
...@@ -226,6 +268,7 @@ CREATE TABLE `mail_get` ( ...@@ -226,6 +268,7 @@ CREATE TABLE `mail_get` (
-- Daten für Tabelle `mail_get` -- Daten für Tabelle `mail_get`
-- --
-- -------------------------------------------------------- -- --------------------------------------------------------
-- --
...@@ -241,7 +284,7 @@ CREATE TABLE `mail_greylist` ( ...@@ -241,7 +284,7 @@ CREATE TABLE `mail_greylist` (
`origin_type` enum('MANUAL','AUTO') NOT NULL default 'AUTO', `origin_type` enum('MANUAL','AUTO') NOT NULL default 'AUTO',
`create_time` datetime NOT NULL default '0000-00-00 00:00:00', `create_time` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`greylist_id`) PRIMARY KEY (`greylist_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
-- --
-- Daten für Tabelle `mail_greylist` -- Daten für Tabelle `mail_greylist`
...@@ -263,7 +306,7 @@ CREATE TABLE `mail_mailman_domain` ( ...@@ -263,7 +306,7 @@ CREATE TABLE `mail_mailman_domain` (
`mm_user` varchar(50) NOT NULL default '', `mm_user` varchar(50) NOT NULL default '',
`mm_group` varchar(50) NOT NULL default '', `mm_group` varchar(50) NOT NULL default '',
PRIMARY KEY (`mailman_id`,`server_id`,`domain`) PRIMARY KEY (`mailman_id`,`server_id`,`domain`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
-- --
-- Daten für Tabelle `mail_mailman_domain` -- Daten für Tabelle `mail_mailman_domain`
...@@ -296,7 +339,6 @@ CREATE TABLE `mail_transport` ( ...@@ -296,7 +339,6 @@ CREATE TABLE `mail_transport` (
-- --
-- Daten für Tabelle `mail_transport` -- Daten für Tabelle `mail_transport`
-- --
-- -------------------------------------------------------- -- --------------------------------------------------------
-- --
...@@ -321,6 +363,7 @@ CREATE TABLE `mail_user` ( ...@@ -321,6 +363,7 @@ CREATE TABLE `mail_user` (
`homedir` varchar(255) NOT NULL, `homedir` varchar(255) NOT NULL,
`autoresponder` enum('n','y') NOT NULL default 'n', `autoresponder` enum('n','y') NOT NULL default 'n',
`autoresponder_text` tinytext NOT NULL, `autoresponder_text` tinytext NOT NULL,
`custom_mailfilter` text,
`postfix` enum('y','n') NOT NULL, `postfix` enum('y','n') NOT NULL,
`access` enum('y','n') NOT NULL, `access` enum('y','n') NOT NULL,
PRIMARY KEY (`mailuser_id`), PRIMARY KEY (`mailuser_id`),
...@@ -361,7 +404,28 @@ CREATE TABLE `server` ( ...@@ -361,7 +404,28 @@ CREATE TABLE `server` (
-- Daten für Tabelle `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[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); -- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `server_ip`
--
CREATE TABLE `server_ip` (
`server_ip_id` bigint(20) NOT NULL auto_increment,
`sys_userid` int(11) NOT NULL default '0',
`sys_groupid` int(11) NOT NULL default '0',
`sys_perm_user` varchar(5) default NULL,
`sys_perm_group` varchar(5) default NULL,
`sys_perm_other` varchar(5) default NULL,
`server_id` int(10) unsigned NOT NULL default '0',
`ip_address` varchar(15) default NULL,
`virtualhost` char(1) NOT NULL default 'y',
PRIMARY KEY (`server_ip_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
--
-- Daten für Tabelle `server_ip`
--
-- -------------------------------------------------------- -- --------------------------------------------------------
...@@ -487,7 +551,6 @@ CREATE TABLE `spamfilter_wblist` ( ...@@ -487,7 +551,6 @@ CREATE TABLE `spamfilter_wblist` (
-- -------------------------------------------------------- -- --------------------------------------------------------
-- --
-- Tabellenstruktur für Tabelle `sys_datalog` -- Tabellenstruktur für Tabelle `sys_datalog`
-- --
...@@ -530,7 +593,7 @@ CREATE TABLE `sys_dbsync` ( ...@@ -530,7 +593,7 @@ CREATE TABLE `sys_dbsync` (
`last_datalog_id` bigint(20) NOT NULL default '0', `last_datalog_id` bigint(20) NOT NULL default '0',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `last_datalog_id` (`last_datalog_id`) KEY `last_datalog_id` (`last_datalog_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ; ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
-- --
-- Daten für Tabelle `sys_dbsync` -- Daten für Tabelle `sys_dbsync`
...@@ -583,7 +646,6 @@ CREATE TABLE `sys_group` ( ...@@ -583,7 +646,6 @@ CREATE TABLE `sys_group` (
INSERT INTO `sys_group` (`groupid`, `name`, `description`, `client_id`) VALUES (1, 'admin', 'Administrators group', 0); INSERT INTO `sys_group` (`groupid`, `name`, `description`, `client_id`) VALUES (1, 'admin', 'Administrators group', 0);
INSERT INTO `sys_group` (`groupid`, `name`, `description`, `client_id`) VALUES (2, 'user', 'Users Group', 0); INSERT INTO `sys_group` (`groupid`, `name`, `description`, `client_id`) VALUES (2, 'user', 'Users Group', 0);
-- -------------------------------------------------------- -- --------------------------------------------------------
-- --
...@@ -615,4 +677,42 @@ CREATE TABLE `sys_user` ( ...@@ -615,4 +677,42 @@ CREATE TABLE `sys_user` (
-- Daten für Tabelle `sys_user` -- Daten für Tabelle `sys_user`
-- --
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); 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);
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `web_domain`
--
CREATE TABLE `web_domain` (
`domain_id` bigint(20) NOT NULL auto_increment,
`sys_userid` int(11) NOT NULL default '0',
`sys_groupid` int(11) NOT NULL default '0',
`sys_perm_user` varchar(5) default NULL,
`sys_perm_group` varchar(5) default NULL,
`sys_perm_other` varchar(5) default NULL,
`server_id` int(11) NOT NULL default '0',
`ip_address` varchar(15) default NULL,
`domain` varchar(255) default NULL,
`type` varchar(255) NOT NULL default 'y',
`parent_domain_id` int(11) NOT NULL default '0',
`vhost_type` varchar(255) default NULL,
`document_root` varchar(255) default NULL,
`system_user` varchar(255) default NULL,
`system_group` varchar(255) default NULL,
`hd_quota` int(11) NOT NULL default '0',
`traffic_quota` int(11) NOT NULL default '0',
`cgi` varchar(255) NOT NULL default 'y',
`ssi` varchar(255) NOT NULL default 'y',
`suexec` varchar(255) NOT NULL default 'y',
`php` varchar(255) NOT NULL default 'y',
`redirect_type` varchar(255) NOT NULL default 'y',
`redirect_path` varchar(255) default NULL,
`active` varchar(255) NOT NULL default 'y',
PRIMARY KEY (`domain_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
--
-- Daten für Tabelle `web_domain`
--
######################################################
# This virtual host contains the configuration
# for the ISPConfig controlpanel
######################################################
Listen 8080
NameVirtualHost *:8080
<VirtualHost _default_:8080>
ServerAdmin webmaster@localhost
DocumentRoot /usr/local/ispconfig/interface/web/
<IfModule mod_php5.c>
AddType application/x-httpd-php .php
</IfModule>
<Directory /usr/local/ispconfig/interface/web/>
Options FollowSymLinks
AllowOverride None
</Directory>
ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/access.log combined
ServerSignature Off
</VirtualHost>
\ No newline at end of file
...@@ -35,7 +35,7 @@ ini_set('register_globals',0); ...@@ -35,7 +35,7 @@ ini_set('register_globals',0);
$conf["app_title"] = "ISPConfig"; $conf["app_title"] = "ISPConfig";
$conf["app_version"] = "3.0.0"; $conf["app_version"] = "3.0.0";
$conf["server_id"] = "1"; $conf["server_id"] = "{server_id}";
/* /*
......
##############################################
# #
# Sample Pure-FTPd Mysql configuration file. #
# See README.MySQL for explanations. #
# #
##############################################
# Optional : MySQL server name or IP. Don't define this for unix sockets.
MYSQLServer {mysql_server_ip}
# Optional : MySQL port. Don't define this if a local unix socket is used.
# MYSQLPort 3306
# Optional : define the location of mysql.sock if the server runs on this host.
# MYSQLSocket /var/run/mysqld/mysqld.sock
# Mandatory : user to bind the server as.
MYSQLUser {mysql_server_ispconfig_user}
# Mandatory : user password. You must have a password.
MYSQLPassword {mysql_server_ispconfig_password}
# Mandatory : database to open.
MYSQLDatabase {mysql_server_database}
# Mandatory : how passwords are stored
# Valid values are : "cleartext", "crypt", "md5" and "password"
# ("password" = MySQL password() function)
# You can also use "any" to try "crypt", "md5" *and* "password"
MYSQLCrypt crypt
# In the following directives, parts of the strings are replaced at
# run-time before performing queries :
#
# \L is replaced by the login of the user trying to authenticate.
# \I is replaced by the IP address the user connected to.
# \P is replaced by the port number the user connected to.
# \R is replaced by the IP address the user connected from.
# \D is replaced by the remote IP address, as a long decimal number.
#
# Very complex queries can be performed using these substitution strings,
# especially for virtual hosting.
# Query to execute in order to fetch the password
MYSQLGetPW SELECT password FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L"
# Query to execute in order to fetch the system user name or uid
MYSQLGetUID SELECT uid FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L"
# Optional : default UID - if set this overrides MYSQLGetUID
#MYSQLDefaultUID 1000
# Query to execute in order to fetch the system user group or gid
MYSQLGetGID SELECT gid FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L"
# Optional : default GID - if set this overrides MYSQLGetGID
#MYSQLDefaultGID 1000
# Query to execute in order to fetch the home directory
MYSQLGetDir SELECT dir FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L"
# Optional : query to get the maximal number of files
# Pure-FTPd must have been compiled with virtual quotas support.
MySQLGetQTAFS SELECT quota_files FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND quota_files != '-1' AND username="\L"
# Optional : query to get the maximal disk usage (virtual quotas)
# The number should be in Megabytes.
# Pure-FTPd must have been compiled with virtual quotas support.
MySQLGetQTASZ SELECT quota_size FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND quota_files != '-1' AND username="\L"
# Optional : ratios. The server has to be compiled with ratio support.
MySQLGetRatioUL SELECT ul_ratio FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND quota_files != '-1' AND username="\L"
MySQLGetRatioDL SELECT dl_ratio FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND quota_files != '-1' AND username="\L"
# Optional : bandwidth throttling.
# The server has to be compiled with throttling support.
# Values are in KB/s .
MySQLGetBandwidthUL SELECT ul_bandwidth FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND quota_files != '-1' AND username="\L"
MySQLGetBandwidthDL SELECT dl_bandwidth FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND quota_files != '-1' AND username="\L"
# Enable ~ expansion. NEVER ENABLE THIS BLINDLY UNLESS :
# 1) You know what you are doing.
# 2) Real and virtual users match.
# MySQLForceTildeExpansion 1
# If you upgraded your tables to transactionnal tables (Gemini,
# BerkeleyDB, Innobase...), you can enable SQL transactions to
# avoid races. Leave this commented if you are using the
# traditionnal MyIsam databases or old (< 3.23.x) MySQL versions.
# MySQLTransactions On
...@@ -333,7 +333,7 @@ function show_services () ...@@ -333,7 +333,7 @@ function show_services ()
$status = '<font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#FF0000"><b>Offline</b></font>'; $status = '<font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#FF0000"><b>Offline</b></font>';
} }