merged current stable 0.9.34 release as master
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -440,6 +440,11 @@ if ($page == 'admins'
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
$language_options = '';
|
||||||
|
while (list($language_file, $language_name) = each($languages)) {
|
||||||
|
$language_options.= makeoption($language_name, $language_file, $userinfo['language'], true);
|
||||||
|
}
|
||||||
|
|
||||||
$ipaddress = makeoption($lng['admin']['allips'], "-1");
|
$ipaddress = makeoption($lng['admin']['allips'], "-1");
|
||||||
$ipsandports_stmt = Database::query("
|
$ipsandports_stmt = Database::query("
|
||||||
SELECT `id`, `ip` FROM `" . TABLE_PANEL_IPSANDPORTS . "` GROUP BY `ip` ORDER BY `ip` ASC
|
SELECT `id`, `ip` FROM `" . TABLE_PANEL_IPSANDPORTS . "` GROUP BY `ip` ORDER BY `ip` ASC
|
||||||
@@ -449,8 +454,24 @@ if ($page == 'admins'
|
|||||||
$ipaddress.= makeoption($row['ip'], $row['id']);
|
$ipaddress.= makeoption($row['ip'], $row['id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$admin_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/formfield.admin.php';
|
$customers_ul = makecheckbox('customers_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||||
$admin_add_form = HTMLform2::genHTMLForm($admin_add_data);
|
$diskspace_ul = makecheckbox('diskspace_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||||
|
$traffic_ul = makecheckbox('traffic_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||||
|
$domains_ul = makecheckbox('domains_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||||
|
$subdomains_ul = makecheckbox('subdomains_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||||
|
$emails_ul = makecheckbox('emails_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||||
|
$email_accounts_ul = makecheckbox('email_accounts_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||||
|
$email_forwarders_ul = makecheckbox('email_forwarders_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||||
|
$email_quota_ul = makecheckbox('email_quota_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||||
|
$ftps_ul = makecheckbox('ftps_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||||
|
$tickets_ul = makecheckbox('tickets_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||||
|
$mysqls_ul = makecheckbox('mysqls_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||||
|
|
||||||
|
$admin_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/admin/formfield.admin_add.php';
|
||||||
|
$admin_add_form = htmlform::genHTMLForm($admin_add_data);
|
||||||
|
|
||||||
|
$title = $admin_add_data['admin_add']['title'];
|
||||||
|
$image = $admin_add_data['admin_add']['image'];
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("admins/admins_add") . "\";");
|
eval("echo \"" . getTemplate("admins/admins_add") . "\";");
|
||||||
}
|
}
|
||||||
@@ -759,6 +780,71 @@ if ($page == 'admins'
|
|||||||
$result['diskspace'] = round($result['diskspace'] / 1024, $dec_places);
|
$result['diskspace'] = round($result['diskspace'] / 1024, $dec_places);
|
||||||
$result['email'] = $idna_convert->decode($result['email']);
|
$result['email'] = $idna_convert->decode($result['email']);
|
||||||
|
|
||||||
|
$customers_ul = makecheckbox('customers_ul', $lng['customer']['unlimited'], '-1', false, $result['customers'], true, true);
|
||||||
|
if ($result['customers'] == '-1') {
|
||||||
|
$result['customers'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$diskspace_ul = makecheckbox('diskspace_ul', $lng['customer']['unlimited'], '-1', false, $result['diskspace'], true, true);
|
||||||
|
if ($result['diskspace'] == '-1') {
|
||||||
|
$result['diskspace'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$traffic_ul = makecheckbox('traffic_ul', $lng['customer']['unlimited'], '-1', false, $result['traffic'], true, true);
|
||||||
|
if ($result['traffic'] == '-1') {
|
||||||
|
$result['traffic'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$domains_ul = makecheckbox('domains_ul', $lng['customer']['unlimited'], '-1', false, $result['domains'], true, true);
|
||||||
|
if ($result['domains'] == '-1') {
|
||||||
|
$result['domains'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$subdomains_ul = makecheckbox('subdomains_ul', $lng['customer']['unlimited'], '-1', false, $result['subdomains'], true, true);
|
||||||
|
if ($result['subdomains'] == '-1') {
|
||||||
|
$result['subdomains'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$emails_ul = makecheckbox('emails_ul', $lng['customer']['unlimited'], '-1', false, $result['emails'], true, true);
|
||||||
|
if ($result['emails'] == '-1') {
|
||||||
|
$result['emails'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$email_accounts_ul = makecheckbox('email_accounts_ul', $lng['customer']['unlimited'], '-1', false, $result['email_accounts'], true, true);
|
||||||
|
if ($result['email_accounts'] == '-1') {
|
||||||
|
$result['email_accounts'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$email_forwarders_ul = makecheckbox('email_forwarders_ul', $lng['customer']['unlimited'], '-1', false, $result['email_forwarders'], true, true);
|
||||||
|
if ($result['email_forwarders'] == '-1') {
|
||||||
|
$result['email_forwarders'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$email_quota_ul = makecheckbox('email_quota_ul', $lng['customer']['unlimited'], '-1', false, $result['email_quota'], true, true);
|
||||||
|
if ($result['email_quota'] == '-1') {
|
||||||
|
$result['email_quota'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$ftps_ul = makecheckbox('ftps_ul', $lng['customer']['unlimited'], '-1', false, $result['ftps'], true, true);
|
||||||
|
if ($result['ftps'] == '-1') {
|
||||||
|
$result['ftps'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$tickets_ul = makecheckbox('tickets_ul', $lng['customer']['unlimited'], '-1', false, $result['tickets'], true, true);
|
||||||
|
if ($result['tickets'] == '-1') {
|
||||||
|
$result['tickets'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$mysqls_ul = makecheckbox('mysqls_ul', $lng['customer']['unlimited'], '-1', false, $result['mysqls'], true, true);
|
||||||
|
if ($result['mysqls'] == '-1') {
|
||||||
|
$result['mysqls'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$language_options = '';
|
||||||
|
while (list($language_file, $language_name) = each($languages)) {
|
||||||
|
$language_options.= makeoption($language_name, $language_file, $result['def_language'], true);
|
||||||
|
}
|
||||||
|
|
||||||
$ipaddress = makeoption($lng['admin']['allips'], "-1", $result['ip']);
|
$ipaddress = makeoption($lng['admin']['allips'], "-1", $result['ip']);
|
||||||
$ipsandports_stmt = Database::query("
|
$ipsandports_stmt = Database::query("
|
||||||
SELECT `id`, `ip` FROM `" . TABLE_PANEL_IPSANDPORTS . "` GROUP BY `ip` ORDER BY `ip`, `port` ASC
|
SELECT `id`, `ip` FROM `" . TABLE_PANEL_IPSANDPORTS . "` GROUP BY `ip` ORDER BY `ip`, `port` ASC
|
||||||
@@ -770,8 +856,11 @@ if ($page == 'admins'
|
|||||||
|
|
||||||
$result = htmlentities_array($result);
|
$result = htmlentities_array($result);
|
||||||
|
|
||||||
$admin_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/formfield.admin.php';
|
$admin_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/admin/formfield.admin_edit.php';
|
||||||
$admin_edit_form = HTMLform2::genHTMLForm($admin_edit_data, $result);
|
$admin_edit_form = htmlform::genHTMLForm($admin_edit_data);
|
||||||
|
|
||||||
|
$title = $admin_edit_data['admin_edit']['title'];
|
||||||
|
$image = $admin_edit_data['admin_edit']['image'];
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("admins/admins_edit") . "\";");
|
eval("echo \"" . getTemplate("admins/admins_edit") . "\";");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ if ($page == 'cronjobs' || $page == 'overview') {
|
|||||||
|
|
||||||
// interval
|
// interval
|
||||||
$interval_nfo = explode(' ', $result['interval']);
|
$interval_nfo = explode(' ', $result['interval']);
|
||||||
$result['interval_value'] = $interval_nfo[0];
|
$interval_value = $interval_nfo[0];
|
||||||
|
|
||||||
$interval_interval = '';
|
$interval_interval = '';
|
||||||
$interval_interval .= makeoption($lng['cronmgmt']['minutes'], 'MINUTE', $interval_nfo[1]);
|
$interval_interval .= makeoption($lng['cronmgmt']['minutes'], 'MINUTE', $interval_nfo[1]);
|
||||||
@@ -122,8 +122,11 @@ if ($page == 'cronjobs' || $page == 'overview') {
|
|||||||
$change_cronfile = true;
|
$change_cronfile = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$cronjobs_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/formfield.cronjobs.php';
|
$cronjobs_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/cronjobs/formfield.cronjobs_edit.php';
|
||||||
$cronjobs_edit_form = HTMLform2::genHTMLForm($cronjobs_edit_data, $result);
|
$cronjobs_edit_form = htmlform::genHTMLForm($cronjobs_edit_data);
|
||||||
|
|
||||||
|
$title = $cronjobs_edit_data['cronjobs_edit']['title'];
|
||||||
|
$image = $cronjobs_edit_data['cronjobs_edit']['image'];
|
||||||
|
|
||||||
eval("echo \"" . getTemplate('cronjobs/cronjob_edit') . "\";");
|
eval("echo \"" . getTemplate('cronjobs/cronjob_edit') . "\";");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -990,8 +990,32 @@ if ($page == 'customers'
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$customer_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/formfield.customer.php';
|
$language_options = '';
|
||||||
$customer_add_form = HTMLform2::genHTMLform($customer_add_data);
|
|
||||||
|
while (list($language_file, $language_name) = each($languages)) {
|
||||||
|
$language_options.= makeoption($language_name, $language_file, Settings::Get('panel.standardlanguage'), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
$diskspace_ul = makecheckbox('diskspace_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||||
|
$traffic_ul = makecheckbox('traffic_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||||
|
$subdomains_ul = makecheckbox('subdomains_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||||
|
$emails_ul = makecheckbox('emails_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||||
|
$email_accounts_ul = makecheckbox('email_accounts_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||||
|
$email_forwarders_ul = makecheckbox('email_forwarders_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||||
|
$email_quota_ul = makecheckbox('email_quota_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||||
|
$ftps_ul = makecheckbox('ftps_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||||
|
$tickets_ul = makecheckbox('tickets_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||||
|
$mysqls_ul = makecheckbox('mysqls_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||||
|
|
||||||
|
$gender_options = makeoption($lng['gender']['undef'], 0, true, true, true);
|
||||||
|
$gender_options .= makeoption($lng['gender']['male'], 1, null, true, true);
|
||||||
|
$gender_options .= makeoption($lng['gender']['female'], 2, null, true, true);
|
||||||
|
|
||||||
|
$customer_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/customer/formfield.customer_add.php';
|
||||||
|
$customer_add_form = htmlform::genHTMLForm($customer_add_data);
|
||||||
|
|
||||||
|
$title = $customer_add_data['customer_add']['title'];
|
||||||
|
$image = $customer_add_data['customer_add']['image'];
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("customers/customers_add") . "\";");
|
eval("echo \"" . getTemplate("customers/customers_add") . "\";");
|
||||||
}
|
}
|
||||||
@@ -1559,15 +1583,78 @@ if ($page == 'customers'
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
$language_options = '';
|
||||||
|
|
||||||
|
while (list($language_file, $language_name) = each($languages)) {
|
||||||
|
$language_options.= makeoption($language_name, $language_file, $result['def_language'], true);
|
||||||
|
}
|
||||||
|
|
||||||
$dec_places = Settings::Get('panel.decimal_places');
|
$dec_places = Settings::Get('panel.decimal_places');
|
||||||
$result['traffic'] = round($result['traffic'] / (1024 * 1024), $dec_places);
|
$result['traffic'] = round($result['traffic'] / (1024 * 1024), $dec_places);
|
||||||
$result['diskspace'] = round($result['diskspace'] / 1024, $dec_places);
|
$result['diskspace'] = round($result['diskspace'] / 1024, $dec_places);
|
||||||
$result['email'] = $idna_convert->decode($result['email']);
|
$result['email'] = $idna_convert->decode($result['email']);
|
||||||
|
|
||||||
|
$diskspace_ul = makecheckbox('diskspace_ul', $lng['customer']['unlimited'], '-1', false, $result['diskspace'], true, true);
|
||||||
|
if ($result['diskspace'] == '-1') {
|
||||||
|
$result['diskspace'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$traffic_ul = makecheckbox('traffic_ul', $lng['customer']['unlimited'], '-1', false, $result['traffic'], true, true);
|
||||||
|
if ($result['traffic'] == '-1') {
|
||||||
|
$result['traffic'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$subdomains_ul = makecheckbox('subdomains_ul', $lng['customer']['unlimited'], '-1', false, $result['subdomains'], true, true);
|
||||||
|
if ($result['subdomains'] == '-1') {
|
||||||
|
$result['subdomains'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$emails_ul = makecheckbox('emails_ul', $lng['customer']['unlimited'], '-1', false, $result['emails'], true, true);
|
||||||
|
if ($result['emails'] == '-1') {
|
||||||
|
$result['emails'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$email_accounts_ul = makecheckbox('email_accounts_ul', $lng['customer']['unlimited'], '-1', false, $result['email_accounts'], true, true);
|
||||||
|
if ($result['email_accounts'] == '-1') {
|
||||||
|
$result['email_accounts'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$email_forwarders_ul = makecheckbox('email_forwarders_ul', $lng['customer']['unlimited'], '-1', false, $result['email_forwarders'], true, true);
|
||||||
|
if ($result['email_forwarders'] == '-1') {
|
||||||
|
$result['email_forwarders'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$email_quota_ul = makecheckbox('email_quota_ul', $lng['customer']['unlimited'], '-1', false, $result['email_quota'], true, true);
|
||||||
|
if ($result['email_quota'] == '-1') {
|
||||||
|
$result['email_quota'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$ftps_ul = makecheckbox('ftps_ul', $lng['customer']['unlimited'], '-1', false, $result['ftps'], true, true);
|
||||||
|
if ($result['ftps'] == '-1') {
|
||||||
|
$result['ftps'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$tickets_ul = makecheckbox('tickets_ul', $lng['customer']['unlimited'], '-1', false, $result['tickets'], true, true);
|
||||||
|
if ($result['tickets'] == '-1') {
|
||||||
|
$result['tickets'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$mysqls_ul = makecheckbox('mysqls_ul', $lng['customer']['unlimited'], '-1', false, $result['mysqls'], true, true);
|
||||||
|
if ($result['mysqls'] == '-1') {
|
||||||
|
$result['mysqls'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
$result = htmlentities_array($result);
|
$result = htmlentities_array($result);
|
||||||
|
|
||||||
$customer_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/formfield.customer.php';
|
$gender_options = makeoption($lng['gender']['undef'], 0, ($result['gender'] == '0' ? true : false), true, true);
|
||||||
$customer_edit_form = HTMLform2::genHTMLform($customer_edit_data, $result);
|
$gender_options .= makeoption($lng['gender']['male'], 1, ($result['gender'] == '1' ? true : false), true, true);
|
||||||
|
$gender_options .= makeoption($lng['gender']['female'], 2, ($result['gender'] == '2' ? true : false), true, true);
|
||||||
|
|
||||||
|
$customer_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/customer/formfield.customer_edit.php';
|
||||||
|
$customer_edit_form = htmlform::genHTMLForm($customer_edit_data);
|
||||||
|
|
||||||
|
$title = $customer_edit_data['customer_edit']['title'];
|
||||||
|
$image = $customer_edit_data['customer_edit']['image'];
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("customers/customers_edit") . "\";");
|
eval("echo \"" . getTemplate("customers/customers_edit") . "\";");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -259,10 +259,11 @@ if ($page == 'ipsandports'
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$ipsandports_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/formfield.ipsandports.php';
|
$ipsandports_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/ipsandports/formfield.ipsandports_add.php';
|
||||||
$ipsandports_add_form = HTMLform2::genHTMLForm($ipsandports_add_data);
|
$ipsandports_add_form = htmlform::genHTMLForm($ipsandports_add_data);
|
||||||
|
|
||||||
$title = $lng['admin']['ipsandports']['add'];
|
$title = $ipsandports_add_data['ipsandports_add']['title'];
|
||||||
|
$image = $ipsandports_add_data['ipsandports_add']['image'];
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("ipsandports/ipsandports_add") . "\";");
|
eval("echo \"" . getTemplate("ipsandports/ipsandports_add") . "\";");
|
||||||
}
|
}
|
||||||
@@ -419,10 +420,11 @@ if ($page == 'ipsandports'
|
|||||||
|
|
||||||
$result = htmlentities_array($result);
|
$result = htmlentities_array($result);
|
||||||
|
|
||||||
$ipsandports_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/formfield.ipsandports.php';
|
$ipsandports_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/ipsandports/formfield.ipsandports_edit.php';
|
||||||
$ipsandports_edit_form = HTMLform2::genHTMLForm($ipsandports_edit_data, $result);
|
$ipsandports_edit_form = htmlform::genHTMLForm($ipsandports_edit_data);
|
||||||
|
|
||||||
$title = $lng['admin']['ipsandports']['edit'];
|
$title = $ipsandports_edit_data['ipsandports_edit']['title'];
|
||||||
|
$image = $ipsandports_edit_data['ipsandports_edit']['image'];
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("ipsandports/ipsandports_edit") . "\";");
|
eval("echo \"" . getTemplate("ipsandports/ipsandports_edit") . "\";");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,9 +122,9 @@ if ($page == 'overview') {
|
|||||||
$fpm_reqslowtimeout = 0;
|
$fpm_reqslowtimeout = 0;
|
||||||
}
|
}
|
||||||
elseif (Settings::Get('phpfpm.enabled') == 1) {
|
elseif (Settings::Get('phpfpm.enabled') == 1) {
|
||||||
$fpm_enableslowlog = isset($_POST['fpm_slowlog']) ? (int)$_POST['fpm_slowlog'] : 0;
|
$fpm_enableslowlog = isset($_POST['phpfpm_enable_slowlog']) ? (int)$_POST['phpfpm_enable_slowlog'] : 0;
|
||||||
$fpm_reqtermtimeout = validate($_POST['fpm_reqterm'], 'fpm_reqterm', '/^([0-9]+)(|s|m|h|d)$/');
|
$fpm_reqtermtimeout = validate($_POST['phpfpm_reqtermtimeout'], 'phpfpm_reqtermtimeout', '/^([0-9]+)(|s|m|h|d)$/');
|
||||||
$fpm_reqslowtimeout = validate($_POST['fpm_reqslow'], 'fpm_reqslow', '/^([0-9]+)(|s|m|h|d)$/');
|
$fpm_reqslowtimeout = validate($_POST['phpfpm_reqslowtimeout'], 'phpfpm_reqslowtimeout', '/^([0-9]+)(|s|m|h|d)$/');
|
||||||
// disable fcgid stuff
|
// disable fcgid stuff
|
||||||
$binary = '/usr/bin/php-cgi';
|
$binary = '/usr/bin/php-cgi';
|
||||||
$file_extensions = 'php';
|
$file_extensions = 'php';
|
||||||
@@ -175,10 +175,11 @@ if ($page == 'overview') {
|
|||||||
$result_stmt = Database::query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = 1");
|
$result_stmt = Database::query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = 1");
|
||||||
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
|
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
|
||||||
|
|
||||||
$phpconfig_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/formfield.phpconfig.php';
|
$phpconfig_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/phpconfig/formfield.phpconfig_add.php';
|
||||||
$phpconfig_add_form = HTMLform2::genHTMLForm($phpconfig_add_data);
|
$phpconfig_add_form = htmlform::genHTMLForm($phpconfig_add_data);
|
||||||
|
|
||||||
$title = $lng['admin']['phpsettings']['addsettings'];
|
$title = $phpconfig_add_data['phpconfig_add']['title'];
|
||||||
|
$image = $phpconfig_add_data['phpconfig_add']['image'];
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("phpconfig/overview_add") . "\";");
|
eval("echo \"" . getTemplate("phpconfig/overview_add") . "\";");
|
||||||
}
|
}
|
||||||
@@ -275,9 +276,9 @@ if ($page == 'overview') {
|
|||||||
$fpm_reqslowtimeout = 0;
|
$fpm_reqslowtimeout = 0;
|
||||||
}
|
}
|
||||||
elseif (Settings::Get('phpfpm.enabled') == 1) {
|
elseif (Settings::Get('phpfpm.enabled') == 1) {
|
||||||
$fpm_enableslowlog = isset($_POST['fpm_slowlog']) ? (int)$_POST['fpm_slowlog'] : 0;
|
$fpm_enableslowlog = isset($_POST['phpfpm_enable_slowlog']) ? (int)$_POST['phpfpm_enable_slowlog'] : 0;
|
||||||
$fpm_reqtermtimeout = validate($_POST['fpm_reqterm'], 'fpm_reqterm', '/^([0-9]+)(|s|m|h|d)$/');
|
$fpm_reqtermtimeout = validate($_POST['phpfpm_reqtermtimeout'], 'phpfpm_reqtermtimeout', '/^([0-9]+)(|s|m|h|d)$/');
|
||||||
$fpm_reqslowtimeout = validate($_POST['fpm_reqslow'], 'fpm_reqslow', '/^([0-9]+)(|s|m|h|d)$/');
|
$fpm_reqslowtimeout = validate($_POST['phpfpm_reqslowtimeout'], 'phpfpm_reqslowtimeout', '/^([0-9]+)(|s|m|h|d)$/');
|
||||||
// disable fcgid stuff
|
// disable fcgid stuff
|
||||||
$binary = '/usr/bin/php-cgi';
|
$binary = '/usr/bin/php-cgi';
|
||||||
$file_extensions = 'php';
|
$file_extensions = 'php';
|
||||||
@@ -327,10 +328,11 @@ if ($page == 'overview') {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$phpconfig_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/formfield.phpconfig.php';
|
$phpconfig_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/phpconfig/formfield.phpconfig_edit.php';
|
||||||
$phpconfig_edit_form = HTMLform2::genHTMLForm($phpconfig_edit_data, $result);
|
$phpconfig_edit_form = htmlform::genHTMLForm($phpconfig_edit_data);
|
||||||
|
|
||||||
$title = $lng['admin']['phpsettings']['editsettings'];
|
$title = $phpconfig_edit_data['phpconfig_edit']['title'];
|
||||||
|
$image = $phpconfig_edit_data['phpconfig_edit']['image'];
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("phpconfig/overview_edit") . "\";");
|
eval("echo \"" . getTemplate("phpconfig/overview_edit") . "\";");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -283,8 +283,11 @@ if ($page == 'overview') {
|
|||||||
}
|
}
|
||||||
Database::needRoot(false);
|
Database::needRoot(false);
|
||||||
|
|
||||||
$mysql_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/formfield.mysql.php';
|
$mysql_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/mysql/formfield.mysql_add.php';
|
||||||
$mysql_add_form = HTMLform2::genHTMLForm($mysql_add_data);
|
$mysql_add_form = htmlform::genHTMLForm($mysql_add_data);
|
||||||
|
|
||||||
|
$title = $mysql_add_data['mysql_add']['title'];
|
||||||
|
$image = $mysql_add_data['mysql_add']['image'];
|
||||||
|
|
||||||
eval("echo \"" . getTemplate('mysql/mysqls_add') . "\";");
|
eval("echo \"" . getTemplate('mysql/mysqls_add') . "\";");
|
||||||
}
|
}
|
||||||
@@ -352,9 +355,11 @@ if ($page == 'overview') {
|
|||||||
$sql_root = Database::getSqlData();
|
$sql_root = Database::getSqlData();
|
||||||
Database::needRoot(false);
|
Database::needRoot(false);
|
||||||
|
|
||||||
$result['mysql_servers'] = isset($sql_root['caption']) ? $sql_root['caption'] : '';
|
$mysql_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/mysql/formfield.mysql_edit.php';
|
||||||
$mysql_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/formfield.mysql.php';
|
$mysql_edit_form = htmlform::genHTMLForm($mysql_edit_data);
|
||||||
$mysql_edit_form = HTMLform2::genHTMLForm($mysql_edit_data, $result);
|
|
||||||
|
$title = $mysql_edit_data['mysql_edit']['title'];
|
||||||
|
$image = $mysql_edit_data['mysql_edit']['image'];
|
||||||
|
|
||||||
eval("echo \"" . getTemplate('mysql/mysqls_edit') . "\";");
|
eval("echo \"" . getTemplate('mysql/mysqls_edit') . "\";");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -539,7 +539,7 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
|
|||||||
('panel', 'password_numeric', '0'),
|
('panel', 'password_numeric', '0'),
|
||||||
('panel', 'password_special_char_required', '0'),
|
('panel', 'password_special_char_required', '0'),
|
||||||
('panel', 'password_special_char', '!?<>§$%+#=@'),
|
('panel', 'password_special_char', '!?<>§$%+#=@'),
|
||||||
('panel', 'version', '0.9.34-dev4');
|
('panel', 'version', '0.9.34');
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `panel_tasks`;
|
DROP TABLE IF EXISTS `panel_tasks`;
|
||||||
|
|||||||
@@ -2996,3 +2996,11 @@ if (isFroxlorVersion('0.9.34-dev3')) {
|
|||||||
|
|
||||||
updateToVersion('0.9.34-dev4');
|
updateToVersion('0.9.34-dev4');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isFroxlorVersion('0.9.34-dev4')) {
|
||||||
|
|
||||||
|
showUpdateStep("Updating from 0.9.34-dev4 to 0.9.34 final");
|
||||||
|
lastStepStatus(0);
|
||||||
|
|
||||||
|
updateToVersion('0.9.34');
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,461 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This file is part of the Froxlor project.
|
|
||||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the COPYING
|
|
||||||
* file that was distributed with this source code. You can also view the
|
|
||||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
*
|
|
||||||
* @copyright (c) the authors
|
|
||||||
* @author Roman Schmerold <team@froxlor.org> (2015-)
|
|
||||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
|
||||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
* @package Classes
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
class HTMLform2 {
|
|
||||||
// Internal var to store form
|
|
||||||
private static $_form = '';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* genHTMLform function.
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @static
|
|
||||||
* @param array $formdata (default: array())
|
|
||||||
* @param array $data (default: array())
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function genHTMLform($formdata = array(), $data = false) {
|
|
||||||
global $lng, $theme;
|
|
||||||
self::$_form = '';
|
|
||||||
|
|
||||||
// Parse each group
|
|
||||||
foreach ($formdata as $groupdata) {
|
|
||||||
if (!isset($groupdata['visible']) || $groupdata['visible'] !== false) {
|
|
||||||
// Output Section Heading
|
|
||||||
if (isset($groupdata['title'])) {
|
|
||||||
$grouptitle = $groupdata['title'];
|
|
||||||
eval("self::\$_form .= \"" . getTemplate("htmlform/group_heading", "1") . "\";");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Generate Group Fields
|
|
||||||
foreach($groupdata['fields'] as $fieldname => $fielddata) {
|
|
||||||
if (isset($fielddata['visible'])) {
|
|
||||||
if ($fielddata['visible'] == false) {
|
|
||||||
continue;
|
|
||||||
} elseif ($fielddata['visible'] === 'new' && is_array($data)) {
|
|
||||||
continue;
|
|
||||||
} elseif ($fielddata['visible'] === 'edit' && !is_array($data)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set value if given
|
|
||||||
if (!empty($data)) {
|
|
||||||
$fielddata = self::_setValue($fieldname, $fielddata, $data);
|
|
||||||
}
|
|
||||||
|
|
||||||
$field = self::_parseDataField($fieldname, $fielddata);
|
|
||||||
|
|
||||||
$label = $fielddata['label'] . self::_getMandatoryFlag($fielddata);
|
|
||||||
if (isset($fielddata['desc']) && $fielddata['desc'] != "") {
|
|
||||||
$desc = $fielddata['desc'];
|
|
||||||
} else {
|
|
||||||
$desc = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
switch($fielddata['type']) {
|
|
||||||
case 'checkbox':
|
|
||||||
eval("self::\$_form .= \"" . getTemplate("htmlform/skeleton_checkbox", "1") . "\";");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
eval("self::\$_form .= \"" . getTemplate("htmlform/skeleton", "1") . "\";");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
eval("self::\$_form .= \"" . getTemplate("htmlform/form_end", "1") . "\";");
|
|
||||||
|
|
||||||
return self::$_form;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static function _setValue($fieldname, $fielddata, $data) {
|
|
||||||
if (isset($data[$fieldname])) {
|
|
||||||
switch($fielddata['type']) {
|
|
||||||
case 'checkbox':
|
|
||||||
$fielddata['attributes']['checked'] = ($data[$fieldname] == 1) ? true : false;
|
|
||||||
break;
|
|
||||||
case 'select':
|
|
||||||
$fielddata['selected'] = $data[$fieldname];
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$fielddata['value'] = $data[$fieldname];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $fielddata;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static function _parseDataField($fieldname, $fielddata) {
|
|
||||||
switch($fielddata['type']) {
|
|
||||||
case 'button':
|
|
||||||
case 'submit':
|
|
||||||
case 'reset':
|
|
||||||
return self::_button($fieldname, $fielddata);
|
|
||||||
break;
|
|
||||||
case 'text':
|
|
||||||
case 'password':
|
|
||||||
case 'hidden':
|
|
||||||
case 'file':
|
|
||||||
case 'email':
|
|
||||||
return self::_input($fieldname, $fielddata);
|
|
||||||
break;
|
|
||||||
case 'textul':
|
|
||||||
return self::_inputUl($fieldname, $fielddata);
|
|
||||||
break;
|
|
||||||
case 'radio':
|
|
||||||
return self::_inputRadio($fieldname, $fielddata);
|
|
||||||
break;
|
|
||||||
case 'checkbox':
|
|
||||||
return self::_inputCheckbox($fieldname, $fielddata);
|
|
||||||
break;
|
|
||||||
case 'static':
|
|
||||||
return self::_static($fieldname, $fielddata);
|
|
||||||
break;
|
|
||||||
case 'select':
|
|
||||||
return self::_select($fieldname, $fielddata);
|
|
||||||
break;
|
|
||||||
case 'textarea':
|
|
||||||
return self::_textarea($fieldname, $fielddata);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* _parseAttributes function.
|
|
||||||
*
|
|
||||||
* @access private
|
|
||||||
* @static
|
|
||||||
* @param string $fieldname
|
|
||||||
* @param array $fielddata
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
private static function _parseAttributes($fieldname, $fielddata) {
|
|
||||||
$attributes = array();
|
|
||||||
|
|
||||||
// name
|
|
||||||
$attributes['name'] = $fieldname;
|
|
||||||
$attributes['id'] = $fieldname;
|
|
||||||
|
|
||||||
// value
|
|
||||||
if ($fielddata['type'] != 'select') {
|
|
||||||
if (isset($_SESSION['requestData'][$fieldname])) {
|
|
||||||
$attributes['value'] = $_SESSION['requestData'][$fieldname];
|
|
||||||
} elseif (isset($fielddata['value'])) {
|
|
||||||
$attributes['value'] = $fielddata['value'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($fielddata['attributes'])) {
|
|
||||||
if (isset($fielddata['attributes']['checked']) && $fielddata['attributes']['checked'] !== true) {
|
|
||||||
unset($fielddata['attributes']['checked']);
|
|
||||||
}
|
|
||||||
if (isset($fielddata['attributes']['selected']) && $fielddata['attributes']['selected'] !== true) {
|
|
||||||
unset($fielddata['attributes']['selected']);
|
|
||||||
}
|
|
||||||
if (isset($fielddata['attributes']['readonly']) && $fielddata['attributes']['readonly'] !== true) {
|
|
||||||
unset($fielddata['attributes']['readonly']);
|
|
||||||
}
|
|
||||||
return array_merge($attributes, $fielddata['attributes']);
|
|
||||||
} else {
|
|
||||||
return $attributes;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* _glueAttributes function.
|
|
||||||
*
|
|
||||||
* @access private
|
|
||||||
* @static
|
|
||||||
* @param array $attributes
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
private static function _glueAttributes($attributes) {
|
|
||||||
$glued = array();
|
|
||||||
foreach($attributes as $name => $value) {
|
|
||||||
$glued[] = $name . "=\"" . $value . "\"";
|
|
||||||
}
|
|
||||||
return implode(" ", $glued);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* _getMandatoryFlag function.
|
|
||||||
*
|
|
||||||
* @access private
|
|
||||||
* @static
|
|
||||||
* @param array $fielddata
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
private static function _getMandatoryFlag($fielddata) {
|
|
||||||
if (isset($fielddata['mandatory'])) {
|
|
||||||
return ' <span class="red">*</span>';
|
|
||||||
} elseif (isset($fielddata['mandatory_ex'])) {
|
|
||||||
return ' <span class="red">**</span>';
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* _button function.
|
|
||||||
*
|
|
||||||
* @access private
|
|
||||||
* @static
|
|
||||||
* @param string $fieldname
|
|
||||||
* @param array $fielddata (default: array())
|
|
||||||
* @param string $type (default: 'button')
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
private static function _button($fieldname, $fielddata = array()) {
|
|
||||||
$attributes = self::_parseAttributes($fieldname, $fielddata);
|
|
||||||
$attributes['type'] = $fielddata['type'];
|
|
||||||
$attributes = self::_glueAttributes($attributes);
|
|
||||||
|
|
||||||
eval("\$return = \"" . getTemplate("htmlform/button", "1") . "\";");
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* _input function.
|
|
||||||
*
|
|
||||||
* @access private
|
|
||||||
* @static
|
|
||||||
* @param string $fieldname
|
|
||||||
* @param array $fielddata (default: array())
|
|
||||||
* @param string $type (default: "text")
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
private static function _input($fieldname, $fielddata = array()) {
|
|
||||||
$attributes = self::_parseAttributes($fieldname, $fielddata);
|
|
||||||
$attributes['type'] = $fielddata['type'];
|
|
||||||
$attributes = self::_glueAttributes($attributes);
|
|
||||||
|
|
||||||
eval("\$return = \"" . getTemplate("htmlform/input", "1") . "\";");
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* _inputUl function.
|
|
||||||
*
|
|
||||||
* @access private
|
|
||||||
* @static
|
|
||||||
* @param string $fieldname
|
|
||||||
* @param array $fielddata (default: array())
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
private static function _inputUl($fieldname, $fielddata = array()) {
|
|
||||||
global $lng;
|
|
||||||
|
|
||||||
// Input
|
|
||||||
$attributes_input = self::_parseAttributes($fieldname, $fielddata);
|
|
||||||
$attributes_input['type'] = "text";
|
|
||||||
$attributes_input['value'] = ($fielddata['value'] == '-1') ? '' : $fielddata['value'];
|
|
||||||
$attributes_input = self::_glueAttributes($attributes_input);
|
|
||||||
|
|
||||||
// Checkbox
|
|
||||||
$checkboxdata = array(
|
|
||||||
'label' => $lng['customer']['unlimited'],
|
|
||||||
'type' => 'checkbox',
|
|
||||||
'value' => '-1',
|
|
||||||
'attributes' => array(
|
|
||||||
'checked' => ($fielddata['value'] == '-1') ? true : false
|
|
||||||
)
|
|
||||||
);
|
|
||||||
$attributes_checkbox = self::_parseAttributes($fieldname . "_ul", $checkboxdata);
|
|
||||||
$attributes_checkbox['type'] = $checkboxdata['type'];
|
|
||||||
$attributes_checkbox = self::_glueAttributes($attributes_checkbox);
|
|
||||||
$label_checkbox = $checkboxdata['label'];
|
|
||||||
|
|
||||||
eval("\$return = \"" . getTemplate("htmlform/inputul", "1") . "\";");
|
|
||||||
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* _inputRadio function.
|
|
||||||
*
|
|
||||||
* @access private
|
|
||||||
* @static
|
|
||||||
* @param string $fieldname
|
|
||||||
* @param array $fielddata (default: array())
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
private static function _inputRadio($fieldname, $fielddata = array()) {
|
|
||||||
$attributes = self::_parseAttributes($fieldname, $fielddata);
|
|
||||||
$attributes['type'] = $fielddata['type'];
|
|
||||||
$attributes = self::_glueAttributes($attributes);
|
|
||||||
|
|
||||||
// ToDo
|
|
||||||
|
|
||||||
eval("\$return = \"" . getTemplate("htmlform/radio", "1") . "\";");
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* _inputCheckbox function.
|
|
||||||
*
|
|
||||||
* @access private
|
|
||||||
* @static
|
|
||||||
* @param string $fieldname
|
|
||||||
* @param array $fielddata (default: array())
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
private static function _inputCheckbox($fieldname, $fielddata = array(), $labelHidden = true) {
|
|
||||||
$attributes = self::_parseAttributes($fieldname, $fielddata);
|
|
||||||
$attributes['type'] = $fielddata['type'];
|
|
||||||
$attributes = self::_glueAttributes($attributes);
|
|
||||||
|
|
||||||
$label = $fielddata['label'];
|
|
||||||
eval("\$return = \"" . getTemplate("htmlform/checkbox", "1") . "\";");
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* _static function.
|
|
||||||
*
|
|
||||||
* @access private
|
|
||||||
* @static
|
|
||||||
* @param string $fieldname
|
|
||||||
* @param array $fielddata (default: array())
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
private static function _static($fieldname, $fielddata = array()) {
|
|
||||||
$value = $fielddata['value'];
|
|
||||||
eval("\$return = \"" . getTemplate("htmlform/static", "1") . "\";");
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* _select function.
|
|
||||||
*
|
|
||||||
* @access private
|
|
||||||
* @static
|
|
||||||
* @param string $fieldname
|
|
||||||
* @param array $fielddata (default: array())
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
private static function _select($fieldname, $fielddata = array()) {
|
|
||||||
$attributes = self::_parseAttributes($fieldname, $fielddata);
|
|
||||||
$attributes = self::_glueAttributes($attributes);
|
|
||||||
|
|
||||||
if (isset($fielddata['generate'])) {
|
|
||||||
switch($fielddata['generate']) {
|
|
||||||
case 'genders':
|
|
||||||
$fielddata['values'] = self::_generateGenders($fielddata['selected']);
|
|
||||||
break;
|
|
||||||
case 'languages':
|
|
||||||
$fielddata['values'] = self::_generateLanguages($fielddata['selected']);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$values = "";
|
|
||||||
if (is_array($fielddata['values'])) {
|
|
||||||
foreach($fielddata['values'] as $value) {
|
|
||||||
$selected = "";
|
|
||||||
if ((isset($value['selected']) && $value['selected'] == true) || (isset($fielddata['value']) && $value['value'] == $fielddata['value'])) {
|
|
||||||
$selected = " selected";
|
|
||||||
}
|
|
||||||
$values .= "<option value=\"{$value['value']}\"$selected>{$value['label']}</option>";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$values = $fielddata['values'];
|
|
||||||
}
|
|
||||||
eval("\$return = \"" . getTemplate("htmlform/select", "1") . "\";");
|
|
||||||
|
|
||||||
if (isset($fielddata['attributes']['multiple']) && $fielddata['attributes']['multiple'] == true) {
|
|
||||||
$return = str_replace("name=\"$fieldname\"", "name=\"{$fieldname}[]\"", $return);
|
|
||||||
}
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* _textarea function.
|
|
||||||
*
|
|
||||||
* @access private
|
|
||||||
* @static
|
|
||||||
* @param string $fieldname
|
|
||||||
* @param array $fielddata (default: array())
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
private static function _textarea($fieldname, $fielddata = array()) {
|
|
||||||
$attributes = self::_parseAttributes($fieldname, $fielddata);
|
|
||||||
unset($attributes['value']);
|
|
||||||
$attributes = self::_glueAttributes($attributes);
|
|
||||||
|
|
||||||
$value = isset($fielddata['value']) ? $fielddata['value'] : "";
|
|
||||||
eval("\$return = \"" . getTemplate("htmlform/textarea", "1") . "\";");
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static function _generateGenders($selected = "") {
|
|
||||||
global $lng;
|
|
||||||
|
|
||||||
$genders = array(
|
|
||||||
array(
|
|
||||||
"value" => 0,
|
|
||||||
"label" => $lng['gender']['undef'],
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
"value" => 1,
|
|
||||||
"label" => $lng['gender']['male']
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
"value" => 2,
|
|
||||||
"label" => $lng['gender']['female']
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
// Check if something is selected
|
|
||||||
if ($selected != "") {
|
|
||||||
foreach ($genders as $key => $value) {
|
|
||||||
if ($value['value'] == $selected) {
|
|
||||||
$genders[$key]['selected'] = true;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $genders;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static function _generateLanguages($selected = "") {
|
|
||||||
global $languages;
|
|
||||||
$retlanguages = array();
|
|
||||||
while (list($language_file, $language_name) = each($languages)) {
|
|
||||||
$newlng = array(
|
|
||||||
"value" => $language_file,
|
|
||||||
"label" => $language_name
|
|
||||||
);
|
|
||||||
|
|
||||||
if ($language_file == $selected) {
|
|
||||||
$newlng['selected'] = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
$retlanguages[] = $newlng;
|
|
||||||
|
|
||||||
//$language_options.= makeoption($language_name, $language_file, Settings::Get('panel.standardlanguage'), true);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $retlanguages;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,429 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This file is part of the Froxlor project.
|
|
||||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the COPYING
|
|
||||||
* file that was distributed with this source code. You can also view the
|
|
||||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
*
|
|
||||||
* @copyright (c) the authors
|
|
||||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
|
||||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
* @package Configfiles
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Try to guess user/group from settings' email UID/GID
|
|
||||||
$vmail_user=posix_getpwuid(Settings::Get('system.vmail_uid'));
|
|
||||||
$vmail_group=posix_getgrgid(Settings::Get('system.vmail_gid'));
|
|
||||||
|
|
||||||
/* If one of them are not set, call it 'vmail' and suggest creating user/group
|
|
||||||
* in scripts. */
|
|
||||||
if ($vmail_user === false) {
|
|
||||||
$vmail_username="vmail";
|
|
||||||
} else {
|
|
||||||
$vmail_username=$vmail_user['name'];
|
|
||||||
}
|
|
||||||
if ($vmail_group === false) {
|
|
||||||
$vmail_groupname="vmail";
|
|
||||||
} else {
|
|
||||||
$vmail_groupname=$vmail_group['name'];
|
|
||||||
}
|
|
||||||
|
|
||||||
return array(
|
|
||||||
'freebsd' => array(
|
|
||||||
'label' => 'FreeBSD',
|
|
||||||
'services' => array(
|
|
||||||
'http' => array(
|
|
||||||
'label' => $lng['admin']['configfiles']['http'],
|
|
||||||
'daemons' => array(
|
|
||||||
'nginx' => array(
|
|
||||||
'label' => 'Nginx Webserver',
|
|
||||||
'commands_1' => array(
|
|
||||||
'cd /usr/ports/www/nginx',
|
|
||||||
'make config',
|
|
||||||
'set [x] IPv6 protocol (default)',
|
|
||||||
'set [x] Enable HTTP module (default)',
|
|
||||||
'set [x] Enable http_cache module (default)',
|
|
||||||
'set [x] Enable http_gzip_static module',
|
|
||||||
'set [x] Enable http_rewrite module (default)',
|
|
||||||
'set [x] Enable http_ssl module (default)',
|
|
||||||
'set [x] Enable http_stub_status module (default)',
|
|
||||||
'make install clean; rehash',
|
|
||||||
),
|
|
||||||
'commands_2' => array(
|
|
||||||
$configcommand['vhost'],
|
|
||||||
$configcommand['diroptions'],
|
|
||||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : '',
|
|
||||||
'mkdir -p '. Settings::Get('system.documentroot_prefix'),
|
|
||||||
'mkdir -p '. Settings::Get('system.mod_fcgid_tmpdir'),
|
|
||||||
'mkdir -p '. Settings::Get('system.logfiles_directory'),
|
|
||||||
'echo "nginx_enable=\"YES\"" >> /etc/rc.conf'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'usr_local_etc_nginx_nginx.conf' => '/usr/local/etc/nginx/nginx.conf',
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/usr/local/etc/rc.d/nginx restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'apache2' => array(
|
|
||||||
'label' => 'Apache2 Webserver',
|
|
||||||
'commands' => array(
|
|
||||||
'cd /usr/ports/www/apache22',
|
|
||||||
'make config',
|
|
||||||
'make install',
|
|
||||||
$configcommand['vhost'],
|
|
||||||
'chown root:0 ' . Settings::Get('system.apacheconf_vhost'),
|
|
||||||
'chmod 0600 ' . Settings::Get('system.apacheconf_vhost'),
|
|
||||||
$configcommand['diroptions'],
|
|
||||||
'chown root:0 ' . Settings::Get('system.apacheconf_diroptions'),
|
|
||||||
'chmod 0600 ' . Settings::Get('system.apacheconf_diroptions'),
|
|
||||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
|
||||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
|
||||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : '',
|
|
||||||
'mkdir -p ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
|
||||||
'chmod 1777 ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
|
||||||
'echo "accf_http_load=\"YES\"" >> /boot/loader.conf',
|
|
||||||
'echo "accf_data_load=\"YES\"" >> /boot/loader.conf',
|
|
||||||
'echo "apache22_enable=\"YES\"" >> /etc/rc.conf',
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'sh /usr/local/etc/rc.d/apache22 restart'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'dns' => array(
|
|
||||||
'label' => $lng['admin']['configfiles']['dns'],
|
|
||||||
'daemons' => array(
|
|
||||||
|
|
||||||
// Begin: Bind 9.x Config
|
|
||||||
'bind9' => array(
|
|
||||||
'label' => 'Bind9 Nameserver',
|
|
||||||
'commands_1' => array(
|
|
||||||
'cd /usr/ports/dns/bind99',
|
|
||||||
'make config',
|
|
||||||
'set [x] International Domain Names',
|
|
||||||
'set [x] IPv6 protocol (default)',
|
|
||||||
'set [x] 64-bit file support',
|
|
||||||
'set [x] Replace base BIND with this version',
|
|
||||||
'set [x] Enable RPZ NSDNAME policy records',
|
|
||||||
'set [x] Enable RPZ NSIP trigger rules',
|
|
||||||
'set [x] dig/host/nslookup will do DNSSEC validation',
|
|
||||||
'set [x] Build with OpenSSL (Required for DNSSEC) (default)',
|
|
||||||
'set [x] Threading support (default)',
|
|
||||||
'make install clean; rehash',
|
|
||||||
),
|
|
||||||
'commands_2' => array(
|
|
||||||
'echo "named_enable=\"YES\"" >> /etc/rc.conf',
|
|
||||||
PHP_EOL,
|
|
||||||
(strpos(Settings::Get('system.bindconf_directory'), '/etc/namedb') === false) ? '(TIP: Be sure the path below is "/etc/namedb", if not you have configured the bind-directory in a false way in PANEL->SETTINGS->NAMESERVER SETTINGS!)' : null,
|
|
||||||
'echo "include \"'. Settings::Get('system.bindconf_directory') .'froxlor_bind.conf\";" >> '. Settings::Get('system.bindconf_directory') .'named.conf',
|
|
||||||
'echo "include \"'. Settings::Get('system.bindconf_directory') .'default-zone\";" >> '. Settings::Get('system.bindconf_directory') .'named.conf',
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'etc_namedb_named.conf' => Settings::Get('system.bindconf_directory') .'named.conf',
|
|
||||||
'etc_namedb_master_default.zone' => Settings::Get('system.bindconf_directory') .'master/default.zone',
|
|
||||||
'etc_namedb_default-zone' => Settings::Get('system.bindconf_directory') .'default-zone',
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/rc.d/named restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
// End: Bind 9.x Config
|
|
||||||
|
|
||||||
'powerdns' => array(
|
|
||||||
'label' => 'PowerDNS',
|
|
||||||
'commands_1' => array(
|
|
||||||
'cd /usr/ports/dns/powerdns',
|
|
||||||
'make config',
|
|
||||||
'set MySQL backend',
|
|
||||||
'make install',
|
|
||||||
'echo "pdns_enable=\"YES\"" >> /etc/rc.conf',
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'usr_local_etc_pdns_pdns.conf' => '/usr/local/etc/pdns/pdns.conf'
|
|
||||||
),
|
|
||||||
'commands' => array(
|
|
||||||
'touch ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf',
|
|
||||||
'chown root:0 ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf',
|
|
||||||
'chmod 0600 ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'sh /usr/local/etc/rc.d/pdns restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'smtp' => array(
|
|
||||||
'label' => $lng['admin']['configfiles']['smtp'],
|
|
||||||
'daemons' => array(
|
|
||||||
'postfix' => array(
|
|
||||||
'label' => 'Postfix',
|
|
||||||
'commands_1' => array(
|
|
||||||
'cd /usr/ports/mail/postfix',
|
|
||||||
'make config',
|
|
||||||
'set Dovecot SASL authentication method',
|
|
||||||
'set Enable SSL and TLS support',
|
|
||||||
'set MySQL maps (choose version with WITH_MYSQL_VER)',
|
|
||||||
'make install'
|
|
||||||
),
|
|
||||||
'commands_2' => array(
|
|
||||||
($vmail_group === false) ? 'pw groupadd ' . $vmail_groupname . ' -g '.Settings::Get('system.vmail_gid') : '',
|
|
||||||
($vmail_user === false) ? 'pw useradd ' . $vmail_username . ' -u '.Settings::Get('system.vmail_uid').' -g '.Settings::Get('system.vmail_gid').' -s/sbin/nologin -d/dev/null' : '',
|
|
||||||
'mkdir -p ' . Settings::Get('system.vmail_homedir'),
|
|
||||||
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . Settings::Get('system.vmail_homedir'),
|
|
||||||
'chmod 0750 ' . Settings::Get('system.vmail_homedir')
|
|
||||||
),
|
|
||||||
'commands_3' => array(
|
|
||||||
'echo "sendmail_enable=\"NO\"" >> /etc/rc.conf',
|
|
||||||
'echo "sendmail_submit_enable=\"NO\"" >> /etc/rc.conf',
|
|
||||||
'echo "sendmail_outbound_enable=\"NO\"" >> /etc/rc.conf',
|
|
||||||
'echo "sendmail_msp_queue_enable=\"NO\"" >> /etc/rc.conf',
|
|
||||||
'echo "postfix_enable=\"YES\"" >> /etc/rc.conf'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'etc_periodic.conf' => '/etc/periodic.conf',
|
|
||||||
'usr_local_etc_postfix_main.cf' => '/usr/local/etc/postfix/main.cf',
|
|
||||||
'usr_local_etc_postfix_mysql-virtual_alias_maps.cf' => '/usr/local/etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'usr_local_etc_postfix_mysql-virtual_mailbox_domains.cf' => '/usr/local/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'usr_local_etc_postfix_mysql-virtual_mailbox_maps.cf' => '/usr/local/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'usr_local_etc_postfix_mysql-virtual_sender_permissions.cf' => '/usr/local/etc/postfix/mysql-virtual_sender_permissions.cf'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'newaliases',
|
|
||||||
'mkdir /var/spool/postfix/etc',
|
|
||||||
'cp /etc/resolv.conf /var/spool/postfix/etc',
|
|
||||||
'sh /usr/local/etc/rc.d/postfix restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'postgrey' => array(
|
|
||||||
'label' => 'Postgrey',
|
|
||||||
'commands_1' => array(
|
|
||||||
'cd /usr/ports/mail/postgrey',
|
|
||||||
'make install clean'
|
|
||||||
),
|
|
||||||
'commands_2' => array(
|
|
||||||
'sed -i.bak \'s/# *check_policy_service *inet:127\.0\.0\.1:10023/ check_policy_service inet:127\.0\.0\.1:10023/\' /usr/local/etc/postfix/main.cf',
|
|
||||||
'echo "postgrey_enable=\"YES\"" >> /etc/rc.conf'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/usr/local/etc/rc.d/postgrey restart',
|
|
||||||
'/usr/local/etc/rc.d/postfix restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'postfix_mxaccess' => array(
|
|
||||||
'label' => 'Postfix MX-Access (anti spam)',
|
|
||||||
'files' => array(
|
|
||||||
'etc_postfix_mx_access' => '/usr/local/etc/postfix/mx_access',
|
|
||||||
'etc_postfix_main.cf' => '/usr/local/etc/postfix/main.cf'
|
|
||||||
),
|
|
||||||
'commands_1' => array(
|
|
||||||
'postmap /usr/local/etc/postfix/mx_access'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/usr/local/etc/rc.d/postfix restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'dkim' => array(
|
|
||||||
'label' => 'DomainKey filter',
|
|
||||||
'commands' => array(
|
|
||||||
'cd /usr/ports/mail/dkim-milter/',
|
|
||||||
'make install clean',
|
|
||||||
'touch /usr/local/etc/mail/dkim-filter.conf'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'dkim-filter.conf' => '/usr/local/etc/mail/dkim-filter.conf',
|
|
||||||
'postfix_dkim_addition.cf' => '/usr/local/etc/postfix/main.cf'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/usr/local/etc/rc.d/milter-dkim restart '
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'mail' => array(
|
|
||||||
'label' => $lng['admin']['configfiles']['mail'],
|
|
||||||
'daemons' => array(
|
|
||||||
'dovecot' => array(
|
|
||||||
'label' => 'Dovecot',
|
|
||||||
'commands_1' => array(
|
|
||||||
'cd /usr/ports/mail/dovecot',
|
|
||||||
'make config',
|
|
||||||
'set kqueue(2) support ',
|
|
||||||
'set SSL support ',
|
|
||||||
'set ManageSieve support (optional)',
|
|
||||||
'set MySQL support ',
|
|
||||||
'make install',
|
|
||||||
'echo "dovecot_enable=\"YES\"" >> /etc/rc.conf'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'usr_local_etc_dovecot.conf' => '/usr/local/etc/dovecot.conf',
|
|
||||||
'usr_local_etc_dovecot-sql.conf' => '/usr/local/etc/dovecot-sql.conf'
|
|
||||||
),
|
|
||||||
'commands_2' => array(
|
|
||||||
'echo "dovecot unix - n n - - pipe
|
|
||||||
flags=DRhu user='.$vmail_username.':'.$vmail_groupname.' argv=/usr/local/libexec/dovecot/deliver -f ${sender} -d ${recipient}" >> /usr/local/etc/postfix/master.cf',
|
|
||||||
'chmod 0640 /usr/local/etc/dovecot-sql.conf'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'sh /usr/local/etc/rc.d/dovecot restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
|
|
||||||
// Begin: Dovecot 2.x Config
|
|
||||||
'dovecot2' => array(
|
|
||||||
'label' => 'Dovecot 2.x',
|
|
||||||
'commands_1' => array(
|
|
||||||
'cd /usr/ports/mail/dovecot2',
|
|
||||||
'make config',
|
|
||||||
'set [x] kqueue(2) support (default)',
|
|
||||||
'set [x] MySQL database',
|
|
||||||
'set [x] SSL protocol (default)',
|
|
||||||
'make install clean; rehash',
|
|
||||||
),
|
|
||||||
'commands_2' => array(
|
|
||||||
'echo "dovecot_enable=\"YES\"" >> /etc/rc.conf',
|
|
||||||
PHP_EOL,
|
|
||||||
'pw adduser '. $vmail_username .' -g '. $vmail_groupname .' -u '. Settings::Get('system.vmail_gid') .' -d /nonexistent -s /usr/sbin/nologin -c "User for virtual mailtransport used by Postfix and Dovecot"',
|
|
||||||
PHP_EOL,
|
|
||||||
'chmod 0640 /usr/local/etc/dovecot-sql.conf'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'usr_local_etc_dovecot_dovecot.conf' => '/usr/local/etc/dovecot/dovecot.conf',
|
|
||||||
'usr_local_etc_dovecot_dovecot-sql.conf' => '/usr/local/etc/dovecot/dovecot-sql.conf'
|
|
||||||
),
|
|
||||||
'commands_3' => array(
|
|
||||||
'echo "dovecot unix - n n - - pipe'. PHP_EOL .'flags=DRhu user='. $vmail_username .':'. $vmail_groupname .' argv=/usr/lib/dovecot/deliver -f ${sender} -d ${recipient} -a ${recipient}" >> /usr/local/etc/postfix/master.cf',
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/usr/local/etc/rc.d/dovecot restart'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
// End: Dovecot 2.x Config
|
|
||||||
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'ftp' => array(
|
|
||||||
'label' => $lng['admin']['configfiles']['ftp'],
|
|
||||||
'daemons' => array(
|
|
||||||
'proftpd' => array(
|
|
||||||
'label' => 'ProFTPd',
|
|
||||||
'commands_1' => array(
|
|
||||||
'cd /usr/ports/ftp/proftpd',
|
|
||||||
'make config',
|
|
||||||
'set MySQL auth',
|
|
||||||
'set Include mod_quota',
|
|
||||||
'make install clean'
|
|
||||||
),
|
|
||||||
'commands_2' => array(
|
|
||||||
'touch /usr/local/etc/proftpd.conf',
|
|
||||||
'chown root:0 /usr/local/etc/proftpd.conf',
|
|
||||||
'chmod 0600 /usr/local/etc/proftpd.conf',
|
|
||||||
'echo "proftpd_enable=\"YES\"" >> /etc/rc.conf'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'etc_proftpd_proftpd.conf' => '/usr/local/etc/proftpd.conf'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/usr/local/etc/rc.d/proftpd restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'pure-ftpd' => array (
|
|
||||||
'label' => 'Pure-FTPd',
|
|
||||||
'commands_1' => array (
|
|
||||||
'cd /usr/ports/ftp/pure-ftpd',
|
|
||||||
'make config',
|
|
||||||
'# select LARGEFILE,MYSQL,PAM,PRIVSEP,SENDFILE,THROTTLING,TLS,UTF8,VIRTUALCHROOT',
|
|
||||||
'make install clean'
|
|
||||||
),
|
|
||||||
'commands_2' => array(
|
|
||||||
'touch /usr/local/etc/pure-ftpd.conf',
|
|
||||||
'touch /usr/local/etc/pureftpd-mysql.conf',
|
|
||||||
'chown root:0 /usr/local/etc/pure-ftpd.conf',
|
|
||||||
'chown root:0 /usr/local/etc/pureftpd-mysql.conf',
|
|
||||||
'chmod 0600 /usr/local/etc/pure-ftpd.conf',
|
|
||||||
'chmod 0600 /usr/local/etc/pureftpd-mysql.conf',
|
|
||||||
'echo "pure-ftpd_enable="YES" >> /etc/rc.conf'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'usr_local_etc_pure-ftpd.conf' => '/usr/local/etc/pure-ftpd.conf',
|
|
||||||
'usr_local_etc_pureftpd-mysql.conf' => '/usr/local/etc/pureftpd-mysql.conf'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'service pure-ftpd restart'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'etc' => array(
|
|
||||||
'label' => $lng['admin']['configfiles']['etc'],
|
|
||||||
'daemons' => array(
|
|
||||||
'cron' => array(
|
|
||||||
'label' => 'Crond (cronscript)',
|
|
||||||
'commands' => array(
|
|
||||||
'echo "*/5 * * * * root nice -n 5 /usr/local/bin/php -q '.makeCorrectDir(dirname(dirname(dirname(__FILE__)))).'scripts/froxlor_master_cronjob.php" >> /etc/crontab'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
Settings::Get('system.crondreload')
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'awstats' => array(
|
|
||||||
'label' => 'Awstats',
|
|
||||||
'commands' => array(
|
|
||||||
'cd /usr/ports/www/awstats/',
|
|
||||||
'make install clean',
|
|
||||||
'cp /usr/local/www/awstats/cgi-bin/awstats.model.conf '.makeCorrectDir(Settings::Get('system.awstats_conf')),
|
|
||||||
'sed -i.bak \'s/^LogFile/# LogFile/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
|
||||||
'sed -i.bak \'s/^LogType/# LogType/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
|
||||||
'sed -i.bak \'s/^LogFormat/# LogFormat/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
|
||||||
'sed -i.bak \'s/^LogSeparator/# LogSeparator/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
|
||||||
'sed -i.bak \'s/^SiteDomain/# SiteDomain/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
|
||||||
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
|
||||||
'sed -i.bak \'s|^\\(DirIcons=\\).*$|\\1\\"/awstats-icon\\"|\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
|
||||||
'# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'libnss' => array(
|
|
||||||
'label' => 'libnss (system login with mysql)',
|
|
||||||
'commands_1' => array(
|
|
||||||
'cd /usr/ports/net/libnss-mysql',
|
|
||||||
'make install clean',
|
|
||||||
'echo "nscd_enable=\"YES\"" >> /etc/rc.conf'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'usr_local_etc_libnss-mysql.cfg' => '/usr/local/etc/libnss-mysql.cfg',
|
|
||||||
'usr_local_etc_libnss-mysql-root.cfg' => '/usr/local/etc/libnss-mysql-root.cfg',
|
|
||||||
'etc_nsswitch.conf' => '/etc/nsswitch.conf'
|
|
||||||
),
|
|
||||||
'commands_2' => array(
|
|
||||||
'chmod 600 /usr/local/etc/libnss-mysql.cfg /usr/local/etc/libnss-mysql-root.cfg'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'sh /etc/rc.d/nscd restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'logrotate' => array(
|
|
||||||
'label' => 'Logrotate',
|
|
||||||
'commands_1' => array(
|
|
||||||
'cd /usr/ports/sysutils/logrotate/',
|
|
||||||
'make install clean clean-depends',
|
|
||||||
'touch /etc/logrotate.d/froxlor',
|
|
||||||
'chmod 644 /etc/logrotate.d/froxlor'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'etc_logrotated_froxlor' => '/etc/logrotate.d/froxlor'
|
|
||||||
),
|
|
||||||
'commands_2' => array(
|
|
||||||
'# create cronjob-entry (daily-recommended)',
|
|
||||||
'0 2 * * * /usr/local/sbin/logrotate -f /etc/logrotate.d/froxlor'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
@@ -1441,7 +1441,7 @@ sql_select: SELECT password_enc FROM mail_users WHERE username='%u@%r' OR email=
|
|||||||
<service type="mail" title="{{lng.admin.configfiles.mail}}">
|
<service type="mail" title="{{lng.admin.configfiles.mail}}">
|
||||||
<!-- Dovecot -->
|
<!-- Dovecot -->
|
||||||
<daemon name="dovecot" version="2" title="Dovecot" default="true">
|
<daemon name="dovecot" version="2" title="Dovecot" default="true">
|
||||||
<command><![CDATA[echo "net-mail/dovecot mysql" >> /etc/portage/package.use]]></command>
|
<command><![CDATA[echo "net-mail/dovecot mysql managesieve sieve" >> /etc/portage/package.use]]></command>
|
||||||
<install><![CDATA[emerge net-mail/dovecot]]></install>
|
<install><![CDATA[emerge net-mail/dovecot]]></install>
|
||||||
<file name="/etc/dovecot/dovecot.conf" chown="root:root"
|
<file name="/etc/dovecot/dovecot.conf" chown="root:root"
|
||||||
chmod="0640" backup="true">
|
chmod="0640" backup="true">
|
||||||
@@ -1557,6 +1557,233 @@ default_pass_scheme = CRYPT
|
|||||||
password_query = "SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('*:storage=', quota,'M') AS userdb_quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR '%Ls' = 'smtp' OR '%Ls' = 'sieve')"
|
password_query = "SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('*:storage=', quota,'M') AS userdb_quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR '%Ls' = 'smtp' OR '%Ls' = 'sieve')"
|
||||||
user_query = "SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir, maildir) AS mail, uid, gid, CONCAT('*:storage=', quota,'M') AS quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u')"
|
user_query = "SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir, maildir) AS mail, uid, gid, CONCAT('*:storage=', quota,'M') AS quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u')"
|
||||||
iterate_query = "SELECT username AS user FROM mail_users WHERE (imap = 1 OR pop3 = 1)"
|
iterate_query = "SELECT username AS user FROM mail_users WHERE (imap = 1 OR pop3 = 1)"
|
||||||
|
]]>
|
||||||
|
</content>
|
||||||
|
</file>
|
||||||
|
<file name="/etc/dovecot/conf.d/20-managesieve.conf" chown="root:root"
|
||||||
|
chmod="0600" backup="true">
|
||||||
|
<content><![CDATA[
|
||||||
|
##
|
||||||
|
## ManageSieve specific settings
|
||||||
|
##
|
||||||
|
|
||||||
|
# Uncomment to enable managesieve protocol:
|
||||||
|
protocols = $protocols sieve
|
||||||
|
|
||||||
|
# Service definitions
|
||||||
|
|
||||||
|
service managesieve-login {
|
||||||
|
inet_listener sieve {
|
||||||
|
port = 4190
|
||||||
|
}
|
||||||
|
|
||||||
|
#inet_listener sieve_deprecated {
|
||||||
|
# port = 2000
|
||||||
|
#}
|
||||||
|
|
||||||
|
# Number of connections to handle before starting a new process. Typically
|
||||||
|
# the only useful values are 0 (unlimited) or 1. 1 is more secure, but 0
|
||||||
|
# is faster. <doc/wiki/LoginProcess.txt>
|
||||||
|
#service_count = 1
|
||||||
|
|
||||||
|
# Number of processes to always keep waiting for more connections.
|
||||||
|
#process_min_avail = 0
|
||||||
|
|
||||||
|
# If you set service_count=0, you probably need to grow this.
|
||||||
|
#vsz_limit = 64M
|
||||||
|
}
|
||||||
|
|
||||||
|
#service managesieve {
|
||||||
|
# Max. number of ManageSieve processes (connections)
|
||||||
|
#process_limit = 1024
|
||||||
|
#}
|
||||||
|
|
||||||
|
# Service configuration
|
||||||
|
|
||||||
|
protocol sieve {
|
||||||
|
# Maximum ManageSieve command line length in bytes. ManageSieve usually does
|
||||||
|
# not involve overly long command lines, so this setting will not normally
|
||||||
|
# need adjustment
|
||||||
|
#managesieve_max_line_length = 65536
|
||||||
|
|
||||||
|
# Maximum number of ManageSieve connections allowed for a user from each IP
|
||||||
|
# address.
|
||||||
|
# NOTE: The username is compared case-sensitively.
|
||||||
|
#mail_max_userip_connections = 10
|
||||||
|
|
||||||
|
# Space separated list of plugins to load (none known to be useful so far).
|
||||||
|
# Do NOT try to load IMAP plugins here.
|
||||||
|
#mail_plugins =
|
||||||
|
|
||||||
|
# MANAGESIEVE logout format string:
|
||||||
|
# %i - total number of bytes read from client
|
||||||
|
# %o - total number of bytes sent to client
|
||||||
|
#managesieve_logout_format = bytes=%i/%o
|
||||||
|
|
||||||
|
# To fool ManageSieve clients that are focused on CMU's timesieved you can
|
||||||
|
# specify the IMPLEMENTATION capability that Dovecot reports to clients.
|
||||||
|
# For example: 'Cyrus timsieved v2.2.13'
|
||||||
|
#managesieve_implementation_string = Dovecot Pigeonhole
|
||||||
|
|
||||||
|
# Explicitly specify the SIEVE and NOTIFY capability reported by the server
|
||||||
|
# before login. If left unassigned these will be reported dynamically
|
||||||
|
# according to what the Sieve interpreter supports by default (after login
|
||||||
|
# this may differ depending on the user).
|
||||||
|
#managesieve_sieve_capability =
|
||||||
|
#managesieve_notify_capability =
|
||||||
|
|
||||||
|
# The maximum number of compile errors that are returned to the client upon
|
||||||
|
# script upload or script verification.
|
||||||
|
#managesieve_max_compile_errors = 5
|
||||||
|
|
||||||
|
# Refer to 90-sieve.conf for script quota configuration and configuration of
|
||||||
|
# Sieve execution limits.
|
||||||
|
}
|
||||||
|
]]>
|
||||||
|
</content>
|
||||||
|
</file>
|
||||||
|
<file name="/etc/dovecot/conf.d/90-sieve.conf" chown="root:root"
|
||||||
|
chmod="0600" backup="true">
|
||||||
|
<content><![CDATA[
|
||||||
|
##
|
||||||
|
## Settings for the Sieve interpreter
|
||||||
|
##
|
||||||
|
|
||||||
|
# Do not forget to enable the Sieve plugin in 15-lda.conf and 20-lmtp.conf
|
||||||
|
# by adding it to the respective mail_plugins= settings.
|
||||||
|
|
||||||
|
# The Sieve interpreter can retrieve Sieve scripts from several types of
|
||||||
|
# locations. The default `file' location type is a local filesystem path
|
||||||
|
# pointing to a Sieve script file or a directory containing multiple Sieve
|
||||||
|
# script files. More complex setups can use other location types such as
|
||||||
|
# `ldap' or `dict' to fetch Sieve scripts from remote databases.
|
||||||
|
#
|
||||||
|
# All settings that specify the location of one ore more Sieve scripts accept
|
||||||
|
# the following syntax:
|
||||||
|
#
|
||||||
|
# location = [<type>:]path[;<option>[=<value>][;...]]
|
||||||
|
#
|
||||||
|
# If the type prefix is omitted, the script location type is 'file' and the
|
||||||
|
# location is interpreted as a local filesystem path pointing to a Sieve script
|
||||||
|
# file or directory. Refer to Pigeonhole wiki or INSTALL file for more
|
||||||
|
# information.
|
||||||
|
|
||||||
|
plugin {
|
||||||
|
# The location of the user's main Sieve script or script storage. The LDA
|
||||||
|
# Sieve plugin uses this to find the active script for Sieve filtering at
|
||||||
|
# delivery. The "include" extension uses this location for retrieving
|
||||||
|
# :personal" scripts. This is also where the ManageSieve service will store
|
||||||
|
# the user's scripts, if supported.
|
||||||
|
#
|
||||||
|
# Currently only the 'file:' location type supports ManageSieve operation.
|
||||||
|
# Other location types like 'dict:' and 'ldap:' can currently only
|
||||||
|
# be used as a read-only script source ().
|
||||||
|
#
|
||||||
|
# For the 'file:' type: use the ';active=' parameter to specify where the
|
||||||
|
# active script symlink is located.
|
||||||
|
# For other types: use the ';name=' parameter to specify the name of the
|
||||||
|
# default/active script.
|
||||||
|
|
||||||
|
sieve = file:~/sieve;active=~/sieve/.dovecot.sieve
|
||||||
|
|
||||||
|
# The default Sieve script when the user has none. This is the location of a
|
||||||
|
# global sieve script file, which gets executed ONLY if user's personal Sieve
|
||||||
|
# script doesn't exist. Be sure to pre-compile this script manually using the
|
||||||
|
# sievec command line tool if the binary is not stored in a global location.
|
||||||
|
# --> See sieve_before for executing scripts before the user's personal
|
||||||
|
# script.
|
||||||
|
#sieve_default = /var/lib/dovecot/sieve/default.sieve
|
||||||
|
|
||||||
|
# The name by which the default Sieve script (as configured by the
|
||||||
|
# sieve_default setting) is visible to the user through ManageSieve.
|
||||||
|
#sieve_default_name =
|
||||||
|
|
||||||
|
# Location for ":global" include scripts as used by the "include" extension.
|
||||||
|
#sieve_global =
|
||||||
|
|
||||||
|
# Location Sieve of scripts that need to be executed before the user's
|
||||||
|
# personal script. If a 'file' location path points to a directory, all the
|
||||||
|
# Sieve scripts contained therein (with the proper `.sieve' extension) are
|
||||||
|
# executed. The order of execution within that directory is determined by the
|
||||||
|
# file names, using a normal 8bit per-character comparison.
|
||||||
|
#
|
||||||
|
# Multiple script locations can be specified by appending an increasing number
|
||||||
|
# to the setting name. The Sieve scripts found from these locations are added
|
||||||
|
# to the script execution sequence in the specified order. Reading the
|
||||||
|
# numbered sieve_before settings stops at the first missing setting, so no
|
||||||
|
# numbers may be skipped.
|
||||||
|
#sieve_before = /var/lib/dovecot/sieve.d/
|
||||||
|
#sieve_before2 = ldap:/etc/sieve-ldap.conf;name=ldap-domain
|
||||||
|
#sieve_before3 = (etc...)
|
||||||
|
|
||||||
|
# Identical to sieve_before, only the specified scripts are executed after the
|
||||||
|
# user's script (only when keep is still in effect!). Multiple script
|
||||||
|
# locations can be specified by appending an increasing number.
|
||||||
|
#sieve_after =
|
||||||
|
#sieve_after2 =
|
||||||
|
#sieve_after2 = (etc...)
|
||||||
|
|
||||||
|
# Which Sieve language extensions are available to users. By default, all
|
||||||
|
# supported extensions are available, except for deprecated extensions or
|
||||||
|
# those that are still under development. Some system administrators may want
|
||||||
|
# to disable certain Sieve extensions or enable those that are not available
|
||||||
|
# by default. This setting can use '+' and '-' to specify differences relative
|
||||||
|
# to the default. For example `sieve_extensions = +imapflags' will enable the
|
||||||
|
# deprecated imapflags extension in addition to all extensions were already
|
||||||
|
# enabled by default.
|
||||||
|
#sieve_extensions = +notify +imapflags
|
||||||
|
|
||||||
|
# Which Sieve language extensions are ONLY available in global scripts. This
|
||||||
|
# can be used to restrict the use of certain Sieve extensions to administrator
|
||||||
|
# control, for instance when these extensions can cause security concerns.
|
||||||
|
# This setting has higher precedence than the `sieve_extensions' setting
|
||||||
|
# (above), meaning that the extensions enabled with this setting are never
|
||||||
|
# available to the user's personal script no matter what is specified for the
|
||||||
|
# `sieve_extensions' setting. The syntax of this setting is similar to the
|
||||||
|
# `sieve_extensions' setting, with the difference that extensions are
|
||||||
|
# enabled or disabled for exclusive use in global scripts. Currently, no
|
||||||
|
# extensions are marked as such by default.
|
||||||
|
#sieve_global_extensions =
|
||||||
|
|
||||||
|
# The Pigeonhole Sieve interpreter can have plugins of its own. Using this
|
||||||
|
# setting, the used plugins can be specified. Check the Dovecot wiki
|
||||||
|
# (wiki2.dovecot.org) or the pigeonhole website
|
||||||
|
# (http://pigeonhole.dovecot.org) for available plugins.
|
||||||
|
# The sieve_extprograms plugin is included in this release.
|
||||||
|
#sieve_plugins =
|
||||||
|
|
||||||
|
# The separator that is expected between the :user and :detail
|
||||||
|
# address parts introduced by the subaddress extension. This may
|
||||||
|
# also be a sequence of characters (e.g. '--'). The current
|
||||||
|
# implementation looks for the separator from the left of the
|
||||||
|
# localpart and uses the first one encountered. The :user part is
|
||||||
|
# left of the separator and the :detail part is right. This setting
|
||||||
|
# is also used by Dovecot's LMTP service.
|
||||||
|
#recipient_delimiter = +
|
||||||
|
|
||||||
|
# The maximum size of a Sieve script. The compiler will refuse to compile any
|
||||||
|
# script larger than this limit. If set to 0, no limit on the script size is
|
||||||
|
# enforced.
|
||||||
|
#sieve_max_script_size = 1M
|
||||||
|
|
||||||
|
# The maximum number of actions that can be performed during a single script
|
||||||
|
# execution. If set to 0, no limit on the total number of actions is enforced.
|
||||||
|
#sieve_max_actions = 32
|
||||||
|
|
||||||
|
# The maximum number of redirect actions that can be performed during a single
|
||||||
|
# script execution. If set to 0, no redirect actions are allowed.
|
||||||
|
#sieve_max_redirects = 4
|
||||||
|
|
||||||
|
# The maximum number of personal Sieve scripts a single user can have. If set
|
||||||
|
# to 0, no limit on the number of scripts is enforced.
|
||||||
|
# (Currently only relevant for ManageSieve)
|
||||||
|
#sieve_quota_max_scripts = 0
|
||||||
|
|
||||||
|
# The maximum amount of disk storage a single user's scripts may occupy. If
|
||||||
|
# set to 0, no limit on the used amount of disk storage is enforced.
|
||||||
|
# (Currently only relevant for ManageSieve)
|
||||||
|
#sieve_quota_max_storage = 0
|
||||||
|
}
|
||||||
]]>
|
]]>
|
||||||
</content>
|
</content>
|
||||||
</file>
|
</file>
|
||||||
|
|||||||
@@ -1,419 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This file is part of the Froxlor project.
|
|
||||||
* Copyright (c) 2003-2009 the SysCP Team (see authors).
|
|
||||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the COPYING
|
|
||||||
* file that was distributed with this source code. You can also view the
|
|
||||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
*
|
|
||||||
* @copyright (c) the authors
|
|
||||||
* @author Florian Lippert <flo@syscp.org> (2003-2009)
|
|
||||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
|
||||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
* @package Configfiles
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Try to guess user/group from settings' email UID/GID
|
|
||||||
$vmail_user=posix_getpwuid(Settings::Get('system.vmail_uid'));
|
|
||||||
$vmail_group=posix_getgrgid(Settings::Get('system.vmail_gid'));
|
|
||||||
|
|
||||||
/* If one of them are not set, call it 'vmail' and suggest creating user/group
|
|
||||||
* in scripts. */
|
|
||||||
if ($vmail_user === false) {
|
|
||||||
$vmail_username="vmail";
|
|
||||||
} else {
|
|
||||||
$vmail_username=$vmail_user['name'];
|
|
||||||
}
|
|
||||||
if ($vmail_group === false) {
|
|
||||||
$vmail_groupname="vmail";
|
|
||||||
} else {
|
|
||||||
$vmail_groupname=$vmail_group['name'];
|
|
||||||
}
|
|
||||||
|
|
||||||
return array(
|
|
||||||
'ubuntu_lucid' => array(
|
|
||||||
'label' => 'Ubuntu 10.04 (Lucid) [deprecated]',
|
|
||||||
'services' => array(
|
|
||||||
'http' => array(
|
|
||||||
'label' => $lng['admin']['configfiles']['http'],
|
|
||||||
'daemons' => array(
|
|
||||||
'apache2' => array(
|
|
||||||
'label' => 'Apache 2',
|
|
||||||
'commands' => array(
|
|
||||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
|
||||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
|
||||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : '',
|
|
||||||
'mkdir -p ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
|
||||||
'chmod 1777 ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
|
||||||
'a2dismod userdir'
|
|
||||||
),
|
|
||||||
'files' => ((int)Settings::Get('phpfpm.enabled') == 1) ?
|
|
||||||
array(
|
|
||||||
'etc_apache2_mods-enabled_fastcgi.conf' => '/etc/apache2/mods-enabled/fastcgi.conf'
|
|
||||||
)
|
|
||||||
:
|
|
||||||
null,
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/apache2 restart'
|
|
||||||
),
|
|
||||||
),
|
|
||||||
'lighttpd' => array(
|
|
||||||
'label' => 'Lighttpd Webserver',
|
|
||||||
'commands_1' => array(
|
|
||||||
'apt-get install lighttpd',
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'etc_lighttpd.conf' => '/etc/lighttpd/lighttpd.conf',
|
|
||||||
),
|
|
||||||
'commands_2' => array(
|
|
||||||
$configcommand['vhost'],
|
|
||||||
$configcommand['diroptions'],
|
|
||||||
$configcommand['v_inclighty'],
|
|
||||||
$configcommand['d_inclighty'],
|
|
||||||
'lighty-disable-mod cgi',
|
|
||||||
'lighty-disable-mod fastcgi',
|
|
||||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
|
||||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
|
||||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : '',
|
|
||||||
'mkdir -p ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
|
||||||
'chmod 1777 ' . Settings::Get('system.mod_fcgid_tmpdir')
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/lighttpd restart'
|
|
||||||
),
|
|
||||||
),
|
|
||||||
'nginx' => array(
|
|
||||||
'label' => 'Nginx Webserver',
|
|
||||||
'commands_1' => array(
|
|
||||||
'apt-get install nginx php5-cgi',
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'etc_nginx_nginx.conf' => '/etc/nginx/nginx.conf',
|
|
||||||
'etc_init.d_php-fcgi' => '/etc/init.d/php-fcgi'
|
|
||||||
),
|
|
||||||
'commands_2' => array(
|
|
||||||
'rm /etc/nginx/sites-enabled/default',
|
|
||||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
|
||||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
|
||||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : '',
|
|
||||||
'mkdir -p ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
|
||||||
'chmod 1777 ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
|
||||||
'chmod u+x /etc/init.d/php-fcgi'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/php-fcgi start',
|
|
||||||
'/etc/init.d/nginx restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
'dns' => array(
|
|
||||||
'label' => $lng['admin']['configfiles']['dns'],
|
|
||||||
'daemons' => array(
|
|
||||||
'bind' => array(
|
|
||||||
'label' => 'Bind9',
|
|
||||||
'commands' => array(
|
|
||||||
'apt-get install bind9',
|
|
||||||
'echo "include \"' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf\";" >> /etc/bind/named.conf',
|
|
||||||
'touch ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf',
|
|
||||||
'chown root:bind ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf',
|
|
||||||
'chmod 0644 ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/bind9 restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'powerdns' => array(
|
|
||||||
'label' => 'PowerDNS',
|
|
||||||
'files' => array(
|
|
||||||
'etc_powerdns_pdns.conf' => '/etc/powerdns/pdns.conf',
|
|
||||||
'etc_powerdns_pdns-froxlor.conf' => '/etc/powerdns/pdns_froxlor.conf',
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/pdns restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'smtp' => array(
|
|
||||||
'label' => $lng['admin']['configfiles']['smtp'],
|
|
||||||
'daemons' => array(
|
|
||||||
'postfix_courier' => array(
|
|
||||||
'label' => 'Postfix/Courier',
|
|
||||||
'commands' => array(
|
|
||||||
($vmail_group === false) ? 'groupadd -g ' . Settings::Get('system.vmail_gid') . ' ' . $vmail_groupname : '',
|
|
||||||
($vmail_user === false) ? 'useradd -u ' . Settings::Get('system.vmail_uid') . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
|
||||||
'mkdir -p ' . Settings::Get('system.vmail_homedir'),
|
|
||||||
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . Settings::Get('system.vmail_homedir'),
|
|
||||||
'apt-get install postfix postfix-mysql libsasl2-2 libsasl2-modules libsasl2-modules-sql',
|
|
||||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
|
||||||
'mkdir -p /var/spool/postfix/var/run/mysqld',
|
|
||||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'touch /etc/postfix/mysql-virtual_sender_permissions.cf',
|
|
||||||
'touch /etc/postfix/sasl/smtpd.conf',
|
|
||||||
'chown root:root /etc/postfix/main.cf',
|
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_sender_permissions.cf',
|
|
||||||
'chown root:root /etc/postfix/sasl/smtpd.conf',
|
|
||||||
'chmod 0644 /etc/postfix/main.cf',
|
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_sender_permissions.cf',
|
|
||||||
'chmod 0600 /etc/postfix/sasl/smtpd.conf',
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
|
||||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'etc_postfix_mysql-virtual_sender_permissions.cf' => '/etc/postfix/mysql-virtual_sender_permissions.cf',
|
|
||||||
'etc_postfix_sasl_smtpd.conf' => '/etc/postfix/sasl/smtpd.conf'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'newaliases',
|
|
||||||
'/etc/init.d/postfix restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'dkim' => array(
|
|
||||||
'label' => 'DomainKey filter',
|
|
||||||
'commands_1' => array(
|
|
||||||
'apt-get install dkim-filter',
|
|
||||||
'mkdir -p /etc/postfix/dkim'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'dkim-filter.conf' => '/etc/dkim-filter.conf'
|
|
||||||
),
|
|
||||||
'commands_2' => array(
|
|
||||||
'echo "milter_default_action = accept" >> /etc/postfix/main.cf',
|
|
||||||
'echo "milter_protocol = 2" >> /etc/postfix/main.cf',
|
|
||||||
'echo "smtpd_milters = inet:localhost:8891" >> /etc/postfix/main.cf',
|
|
||||||
'echo "non_smtpd_milters = inet:localhost:8891" >> /etc/postfix/main.cf'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/dkim-filter restart',
|
|
||||||
'/etc/init.d/postfix restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'postfix_dovecot' => array(
|
|
||||||
'label' => 'Postfix/Dovecot',
|
|
||||||
'commands' => array(
|
|
||||||
($vmail_group === false) ? 'groupadd -g ' . Settings::Get('system.vmail_gid') . ' ' . $vmail_groupname : '',
|
|
||||||
($vmail_user === false) ? 'useradd -u ' . Settings::Get('system.vmail_uid') . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
|
||||||
'mkdir -p ' . Settings::Get('system.vmail_homedir'),
|
|
||||||
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . Settings::Get('system.vmail_homedir'),
|
|
||||||
'apt-get install postfix postfix-mysql',
|
|
||||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
|
||||||
'mkdir -p /var/spool/postfix/var/run/mysqld',
|
|
||||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'touch /etc/postfix/mysql-virtual_sender_permissions.cf',
|
|
||||||
'chown root:root /etc/postfix/main.cf',
|
|
||||||
'chown root:root /etc/postfix/master.cf',
|
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_sender_permissions.cf',
|
|
||||||
'chmod 0644 /etc/postfix/main.cf',
|
|
||||||
'chmod 0644 /etc/postfix/master.cf',
|
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_sender_permissions.cf'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
|
||||||
'etc_postfix_master.cf' => '/etc/postfix/master.cf',
|
|
||||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'etc_postfix_mysql-virtual_sender_permissions.cf' => '/etc/postfix/mysql-virtual_sender_permissions.cf'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/postfix restart',
|
|
||||||
'newaliases'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'postfix_mxaccess' => array(
|
|
||||||
'label' => 'Postfix MX-Access (anti spam)',
|
|
||||||
'files' => array(
|
|
||||||
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
|
|
||||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
|
|
||||||
),
|
|
||||||
'commands_1' => array(
|
|
||||||
'postmap /etc/postfix/mx_access'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/postfix restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'exim4' => array(
|
|
||||||
'label' => 'Exim4',
|
|
||||||
'commands_1' => array(
|
|
||||||
'dpkg-reconfigure exim4-config',
|
|
||||||
'# choose "no configuration at this time" and "splitted configuration files" in the dialog'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'etc_exim4_conf.d_acl_30_exim4-config_check_rcpt.rul' => '/etc/exim4/conf.d/acl/30_exim4-config_check_rcpt.rul',
|
|
||||||
'etc_exim4_conf.d_auth_30_froxlor-config' => '/etc/exim4/conf.d/auth/30_froxlor-config',
|
|
||||||
'etc_exim4_conf.d_main_10_froxlor-config_options' => '/etc/exim4/conf.d/main/10_froxlor-config_options',
|
|
||||||
'etc_exim4_conf.d_router_180_froxlor-config' => '/etc/exim4/conf.d/router/180_froxlor-config',
|
|
||||||
'etc_exim4_conf.d_transport_30_froxlor-config' => '/etc/exim4/conf.d/transport/30_froxlor-config'
|
|
||||||
),
|
|
||||||
'commands_2' => array(
|
|
||||||
'chmod o-rx /var/lib/exim4',
|
|
||||||
'chmod o-rx /etc/exim4/conf.d/main/10_froxlor-config_options'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/exim4 restart'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'mail' => array(
|
|
||||||
'label' => $lng['admin']['configfiles']['mail'],
|
|
||||||
'daemons' => array(
|
|
||||||
'courier' => array(
|
|
||||||
'label' => 'Courier',
|
|
||||||
'commands' => array(
|
|
||||||
'apt-get install courier-pop courier-imap courier-authlib-mysql'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'etc_courier_authdaemonrc' => '/etc/courier/authdaemonrc',
|
|
||||||
'etc_courier_authmysqlrc' => '/etc/courier/authmysqlrc'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/courier-authdaemon restart',
|
|
||||||
'/etc/init.d/courier-pop restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'dovecot' => array(
|
|
||||||
'label' => 'Dovecot',
|
|
||||||
'commands_1' => array(
|
|
||||||
'apt-get install dovecot-imapd dovecot-pop3d dovecot-postfix'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'etc_dovecot_auth.d_01-dovecot-postfix.auth' => '/etc/dovecot/auth.d/01-dovecot-postfix.auth',
|
|
||||||
'etc_dovecot_conf.d_01-dovecot-postfix.conf' => '/etc/dovecot/conf.d/01-dovecot-postfix.conf',
|
|
||||||
'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf'
|
|
||||||
),
|
|
||||||
'commands_2' => array(
|
|
||||||
'chmod 0640 /etc/dovecot/dovecot-sql.conf'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/dovecot restart'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'ftp' => array(
|
|
||||||
'label' => $lng['admin']['configfiles']['ftp'],
|
|
||||||
'daemons' => array(
|
|
||||||
'proftpd' => array(
|
|
||||||
'label' => 'ProFTPd',
|
|
||||||
'commands' => array(
|
|
||||||
'apt-get install proftpd-basic proftpd-mod-mysql'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'etc_proftpd_sql.conf' => '/etc/proftpd/sql.conf',
|
|
||||||
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
|
|
||||||
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/proftpd restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'pure-ftpd' => array(
|
|
||||||
'label' => 'Pure FTPd',
|
|
||||||
'commands_1' => array(
|
|
||||||
'apt-get install pure-ftpd-common pure-ftpd-mysql'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'etc_pure-ftpd_conf_MinUID' => '/etc/pure-ftpd/conf/MinUID',
|
|
||||||
'etc_pure-ftpd_conf_MySQLConfigFile' => '/etc/pure-ftpd/conf/MySQLConfigFile',
|
|
||||||
'etc_pure-ftpd_conf_NoAnonymous' => '/etc/pure-ftpd/conf/NoAnonymous',
|
|
||||||
'etc_pure-ftpd_conf_MaxIdleTime' => '/etc/pure-ftpd/conf/MaxIdleTime',
|
|
||||||
'etc_pure-ftpd_conf_ChrootEveryone' => '/etc/pure-ftpd/conf/ChrootEveryone',
|
|
||||||
'etc_pure-ftpd_conf_PAMAuthentication' => '/etc/pure-ftpd/conf/PAMAuthentication',
|
|
||||||
'etc_pure-ftpd_db_mysql.conf' => '/etc/pure-ftpd/db/mysql.conf',
|
|
||||||
'etc_pure-ftpd_conf_CustomerProof' => '/etc/pure-ftpd/conf/CustomerProof',
|
|
||||||
'etc_pure-ftpd_conf_Bind' => '/etc/pure-ftpd/conf/Bind',
|
|
||||||
'etc_default_pure-ftpd-common' => '/etc/default/pure-ftpd-common'
|
|
||||||
),
|
|
||||||
'commands_2' => array(
|
|
||||||
'chmod 0640 /etc/pure-ftpd/db/mysql.conf'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/pure-ftpd-mysql restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'etc' => array(
|
|
||||||
'label' => $lng['admin']['configfiles']['etc'],
|
|
||||||
'daemons' => array(
|
|
||||||
'cron' => array(
|
|
||||||
'label' => 'Crond (cronscript)',
|
|
||||||
'files' => array(
|
|
||||||
'etc_cron.d_froxlor' => '/etc/cron.d/froxlor'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
Settings::Get('system.crondreload')
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'awstats' => array(
|
|
||||||
'label' => 'Awstats',
|
|
||||||
'commands' => array(
|
|
||||||
'apt-get install awstats',
|
|
||||||
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl '.makeCorrectDir(Settings::Get('system.awstats_path')),
|
|
||||||
'mv '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.conf').' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
|
||||||
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
|
||||||
'sed -i.bak \'s|^\\(DirIcons=\\).*$|\\1\\"/awstats-icon\\"|\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
|
||||||
'# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself',
|
|
||||||
'rm /etc/cron.d/awstats'
|
|
||||||
),
|
|
||||||
),
|
|
||||||
'libnss' => array(
|
|
||||||
'label' => 'libnss (system login with mysql)',
|
|
||||||
'commands' => array(
|
|
||||||
'apt-get install libnss-mysql nscd',
|
|
||||||
'chmod 600 /etc/nss-mysql.conf /etc/nss-mysql-root.conf'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'etc_nss-mysql.conf' => '/etc/nss-mysql.conf',
|
|
||||||
'etc_nss-mysql-root.conf' => '/etc/nss-mysql-root.conf',
|
|
||||||
'etc_nsswitch.conf' => '/etc/nsswitch.conf',
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/nscd restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'logrotate' => array(
|
|
||||||
'label' => 'Logrotate',
|
|
||||||
'commands_1' => array(
|
|
||||||
'apt-get install logrotate',
|
|
||||||
'touch /etc/logrotate.d/froxlor',
|
|
||||||
'chmod 644 /etc/logrotate.d/froxlor'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'etc_logrotated_froxlor' => '/etc/logrotate.d/froxlor'
|
|
||||||
),
|
|
||||||
'commands_2' => array(
|
|
||||||
'# apt automatically adds a daily cronjob for logrotate',
|
|
||||||
'# you do not have to do anything else :)'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
@@ -239,6 +239,16 @@ fastcgi_param REDIRECT_STATUS 200;
|
|||||||
</visibility>
|
</visibility>
|
||||||
<content><![CDATA[
|
<content><![CDATA[
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: php-fcgi
|
||||||
|
# Required-Start: $remote_fs $syslog
|
||||||
|
# Required-Stop: $remote_fs $syslog
|
||||||
|
# Default-Start: 2 3 4 5
|
||||||
|
# Default-Stop: 0 1 6
|
||||||
|
# Short-Description: php-fcgi initscript
|
||||||
|
# Description: Custom php-fcgi initscript for Froxlor
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
BIND="127.0.0.1:8888"
|
BIND="127.0.0.1:8888"
|
||||||
USER="www-data"
|
USER="www-data"
|
||||||
PHP_FCGI_CHILDREN="15"
|
PHP_FCGI_CHILDREN="15"
|
||||||
|
|||||||
@@ -1,188 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This file is part of the Froxlor project.
|
|
||||||
* Copyright (c) 2003-2009 the SysCP Team (see authors).
|
|
||||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the COPYING
|
|
||||||
* file that was distributed with this source code. You can also view the
|
|
||||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
*
|
|
||||||
* @copyright (c) the authors
|
|
||||||
* @author Florian Lippert <flo@syscp.org> (2003-2009)
|
|
||||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
|
||||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
* @package Configfiles
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Try to guess user/group from settings' email UID/GID
|
|
||||||
$vmail_user=posix_getpwuid(Settings::Get('system.vmail_uid'));
|
|
||||||
$vmail_group=posix_getgrgid(Settings::Get('system.vmail_gid'));
|
|
||||||
|
|
||||||
/* If one of them are not set, call it 'vmail' and suggest creating user/group
|
|
||||||
* in scripts. */
|
|
||||||
if ($vmail_user === false) {
|
|
||||||
$vmail_username="vmail";
|
|
||||||
} else {
|
|
||||||
$vmail_username=$vmail_user['name'];
|
|
||||||
}
|
|
||||||
if ($vmail_group === false) {
|
|
||||||
$vmail_groupname="vmail";
|
|
||||||
} else {
|
|
||||||
$vmail_groupname=$vmail_group['name'];
|
|
||||||
}
|
|
||||||
|
|
||||||
return array(
|
|
||||||
'sle_10' => array(
|
|
||||||
'label' => 'SUSE Linux Enterprise 10 (deprecated)',
|
|
||||||
'services' => array(
|
|
||||||
'http' => array(
|
|
||||||
'label' => $lng['admin']['configfiles']['http'],
|
|
||||||
'daemons' => array(
|
|
||||||
'apache' => array(
|
|
||||||
'label' => 'Apache',
|
|
||||||
'commands' => array(
|
|
||||||
$configcommand['vhost'],
|
|
||||||
$configcommand['diroptions'],
|
|
||||||
$configcommand['include'],
|
|
||||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
|
||||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
|
||||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : ''
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/apache2 restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'dns' => array(
|
|
||||||
'label' => $lng['admin']['configfiles']['dns'],
|
|
||||||
'daemons' => array(
|
|
||||||
'bind' => array(
|
|
||||||
'label' => 'Bind9',
|
|
||||||
'commands' => array(
|
|
||||||
'echo "include \"' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf\";" >> /etc/named.conf',
|
|
||||||
'touch ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf',
|
|
||||||
'chown named:0 ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf',
|
|
||||||
'chmod 0600 ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/named restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'smtp' => array(
|
|
||||||
'label' => $lng['admin']['configfiles']['smtp'],
|
|
||||||
'daemons' => array(
|
|
||||||
'postfix' => array(
|
|
||||||
'label' => 'Postfix',
|
|
||||||
'files' => array(
|
|
||||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
|
||||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'etc_postfix_mysql-virtual_sender_permissions.cf' => '/etc/postfix/mysql-virtual_sender_permissions.cf',
|
|
||||||
'usr_lib_sasl2_smtpd.conf' => '/usr/lib/sasl2/smtpd.conf'
|
|
||||||
),
|
|
||||||
'commands' => array(
|
|
||||||
($vmail_group === false) ? 'groupadd -g ' . Settings::Get('system.vmail_gid') . ' ' . $vmail_groupname : '',
|
|
||||||
($vmail_user === false) ? 'useradd -u ' . Settings::Get('system.vmail_uid') . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
|
||||||
'mkdir -p ' . Settings::Get('system.vmail_homedir'),
|
|
||||||
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . Settings::Get('system.vmail_homedir'),
|
|
||||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
|
||||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'touch /etc/postfix/mysql-virtual_sender_permissions.cf',
|
|
||||||
'touch /usr/lib/sasl2/smtpd.conf',
|
|
||||||
'chmod 660 /etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'chmod 660 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'chmod 660 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'chmod 660 /etc/postfix/mysql-virtual_sender_permissions.cf',
|
|
||||||
'chmod 660 /usr/lib/sasl2/smtpd.conf',
|
|
||||||
'chgrp postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'chgrp postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'chgrp postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'chgrp postfix /etc/postfix/mysql-virtual_sender_permissions.cf',
|
|
||||||
'chgrp postfix /usr/lib/sasl2/smtpd.conf'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'newaliases',
|
|
||||||
'/etc/init.d/postfix restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'postfix_mxaccess' => array(
|
|
||||||
'label' => 'Postfix MX-Access (anti spam)',
|
|
||||||
'files' => array(
|
|
||||||
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
|
|
||||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
|
|
||||||
),
|
|
||||||
'commands_1' => array(
|
|
||||||
'postmap /etc/postfix/mx_access'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/postfix restart'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'mail' => array(
|
|
||||||
'label' => $lng['admin']['configfiles']['mail'],
|
|
||||||
'daemons' => array(
|
|
||||||
'courier' => array(
|
|
||||||
'label' => 'Courier',
|
|
||||||
'files' => array(
|
|
||||||
'etc_authlib_authdaemonrc' => '/etc/authlib/authdaemonrc',
|
|
||||||
'etc_authlib_authmysqlrc' => '/etc/authlib/authmysqlrc'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/courier-authdaemon restart',
|
|
||||||
'/etc/init.d/courier-pop restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'ftp' => array(
|
|
||||||
'label' => $lng['admin']['configfiles']['ftp'],
|
|
||||||
'daemons' => array(
|
|
||||||
'proftpd' => array(
|
|
||||||
'label' => 'ProFTPd',
|
|
||||||
'files' => array(
|
|
||||||
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
|
|
||||||
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/proftpd restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'etc' => array(
|
|
||||||
'label' => $lng['admin']['configfiles']['etc'],
|
|
||||||
'daemons' => array(
|
|
||||||
'cron' => array(
|
|
||||||
'label' => 'Crond (cronscript)',
|
|
||||||
'files' => array(
|
|
||||||
'etc_cron.d_froxlor' => '/etc/cron.d/froxlor'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
Settings::Get('system.crondreload')
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'awstats' => array(
|
|
||||||
'label' => 'Awstats',
|
|
||||||
'commands' => array(
|
|
||||||
'mv '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.conf').' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
|
||||||
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
|
||||||
'sed -i.bak \'s|^\\(DirIcons=\\).*$|\\1\\"/awstats-icon\\"|\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
|
||||||
'# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
@@ -1,267 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This file is part of the Froxlor project.
|
|
||||||
* Copyright (c) 2011- the Froxlor Team (see authors).
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the COPYING
|
|
||||||
* file that was distributed with this source code. You can also view the
|
|
||||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
*
|
|
||||||
* @copyright (c) the authors
|
|
||||||
* @author Andrej Semen <asemen@suse.de> (2010-2011)
|
|
||||||
* @author Wolfgang Rosenauer <wr@rosenauer.org> (2011)
|
|
||||||
* @author Froxlor team <team@froxlor.org> (2011-)
|
|
||||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
* @package Configfiles
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Try to guess user/group from settings' email UID/GID
|
|
||||||
$vmail_user=posix_getpwuid(Settings::Get('system.vmail_uid'));
|
|
||||||
$vmail_group=posix_getgrgid(Settings::Get('system.vmail_gid'));
|
|
||||||
|
|
||||||
/* If one of them are not set, call it 'vmail' and suggest creating user/group
|
|
||||||
* in scripts. */
|
|
||||||
if ($vmail_user === false) {
|
|
||||||
$vmail_username="vmail";
|
|
||||||
} else {
|
|
||||||
$vmail_username=$vmail_user['name'];
|
|
||||||
}
|
|
||||||
if ($vmail_group === false) {
|
|
||||||
$vmail_groupname="vmail";
|
|
||||||
} else {
|
|
||||||
$vmail_groupname=$vmail_group['name'];
|
|
||||||
}
|
|
||||||
|
|
||||||
return array(
|
|
||||||
'sle_11' => array(
|
|
||||||
'label' => 'SUSE Linux Enterprise 11',
|
|
||||||
'services' => array(
|
|
||||||
'http' => array(
|
|
||||||
'label' => $lng['admin']['configfiles']['http'],
|
|
||||||
'daemons' => array(
|
|
||||||
'apache' => array(
|
|
||||||
'label' => 'Apache',
|
|
||||||
'commands' => array(
|
|
||||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
|
||||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
|
||||||
'Maybe add to /etc/apache2/httpd.conf',
|
|
||||||
'Alias /mail /srv/www/htdocs/roundcubemail',
|
|
||||||
'Alias /webmail /srv/www/htdocs/squirrelmail',
|
|
||||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : ''
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
' '.
|
|
||||||
'/etc/init.d/apache2 restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'dns' => array(
|
|
||||||
'label' => $lng['admin']['configfiles']['dns'],
|
|
||||||
'daemons' => array(
|
|
||||||
'bind' => array(
|
|
||||||
'label' => 'Bind9',
|
|
||||||
'commands' => array(
|
|
||||||
'Add froxlor_bind.conf to the NAMED_CONF_INCLUDE_FILES in /etc/sysconfig/named'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/named restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'smtp' => array(
|
|
||||||
'label' => $lng['admin']['configfiles']['smtp'],
|
|
||||||
'daemons' => array(
|
|
||||||
'postfix' => array(
|
|
||||||
'label' => 'Postfix',
|
|
||||||
'files' => array(
|
|
||||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
|
||||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql_virtual_alias_maps.cf',
|
|
||||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql_virtual_mailbox_domains.cf',
|
|
||||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql_virtual_mailbox_maps.cf',
|
|
||||||
'etc_sasl2_smtpd.conf' => '/etc/sasl2/smtpd.conf'
|
|
||||||
),
|
|
||||||
'commands' => array(
|
|
||||||
($vmail_group === false) ? 'groupadd -g ' . Settings::Get('system.vmail_gid') . ' ' . $vmail_groupname : '',
|
|
||||||
($vmail_user === false) ? 'useradd -u ' . Settings::Get('system.vmail_uid') . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
|
||||||
'mkdir -p ' . Settings::Get('system.vmail_homedir'),
|
|
||||||
'chown -R ' . $vmail_username . ':' . $vmail_groupname . ' ' . Settings::Get('system.vmail_homedir'),
|
|
||||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
|
||||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'touch /etc/sasl2/smtpd.conf',
|
|
||||||
'chmod 660 /etc/postfix/mysql_virtual_alias_maps.cf',
|
|
||||||
'chmod 660 /etc/postfix/mysql_virtual_mailbox_domains.cf',
|
|
||||||
'chmod 660 /etc/postfix/mysql_virtual_mailbox_maps.cf',
|
|
||||||
'chmod 660 /etc/sasl2/smtpd.conf',
|
|
||||||
'chgrp postfix /etc/postfix/mysql_virtual_alias_maps.cf',
|
|
||||||
'chgrp postfix /etc/postfix/mysql_virtual_mailbox_domains.cf',
|
|
||||||
'chgrp postfix /etc/postfix/mysql_virtual_mailbox_maps.cf',
|
|
||||||
'chgrp postfix /etc/sasl2/smtpd.conf'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/postfix restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'postfix_mxaccess' => array(
|
|
||||||
'label' => 'Postfix MX-Access (anti spam)',
|
|
||||||
'files' => array(
|
|
||||||
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
|
|
||||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
|
|
||||||
),
|
|
||||||
'commands_1' => array(
|
|
||||||
'postmap /etc/postfix/mx_access'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/postfix restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'postfix_dovecot' => array(
|
|
||||||
'label' => 'Postfix/Dovecot',
|
|
||||||
'commands' => array(
|
|
||||||
($vmail_group === false) ? 'groupadd -g ' . Settings::Get('system.vmail_gid') . ' ' . $vmail_groupname : '',
|
|
||||||
($vmail_user === false) ? 'useradd -u ' . Settings::Get('system.vmail_uid') . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
|
||||||
'zypper install postfix postfix-mysql',
|
|
||||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
|
||||||
'mkdir -p /var/spool/postfix/var/run/mysqld',
|
|
||||||
'mkdir -p ' . Settings::Get('system.vmail_homedir'),
|
|
||||||
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . Settings::Get('system.vmail_homedir'),
|
|
||||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'touch /etc/postfix/mysql-virtual_sender_permissions.cf',
|
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_sender_permissions.cf',
|
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_sender_permissions.cf'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
|
||||||
'etc_postfix_master.cf' => '/etc/postfix/master.cf',
|
|
||||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'etc_postfix_mysql-virtual_sender_permissions.cf' => '/etc/postfix/mysql-virtual_sender_permissions.cf'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/postfix restart',
|
|
||||||
'newaliases'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'exim4' => array(
|
|
||||||
'label' => 'Exim4',
|
|
||||||
'commands_1' => array(
|
|
||||||
'zypper install exim'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'etc_exim4_conf.d_acl_30_exim4-config_check_rcpt.rul' => '/etc/exim4/conf.d/acl/30_exim4-config_check_rcpt.rul',
|
|
||||||
'etc_exim4_conf.d_auth_30_froxlor-config' => '/etc/exim4/conf.d/auth/30_froxlor-config',
|
|
||||||
'etc_exim4_conf.d_main_10_froxlor-config_options' => '/etc/exim4/conf.d/main/10_froxlor-config_options',
|
|
||||||
'etc_exim4_conf.d_router_180_froxlor-config' => '/etc/exim4/conf.d/router/180_froxlor-config',
|
|
||||||
'etc_exim4_conf.d_transport_30_froxlor-config' => '/etc/exim4/conf.d/transport/30_froxlor-config'
|
|
||||||
),
|
|
||||||
'commands_2' => array(
|
|
||||||
'chmod o-rx /var/lib/exim4',
|
|
||||||
'chmod o-rx /etc/exim4/conf.d/main/10_froxlor-config_options'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/exim4 restart'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'mail' => array(
|
|
||||||
'label' => $lng['admin']['configfiles']['mail'],
|
|
||||||
'daemons' => array(
|
|
||||||
'courier' => array(
|
|
||||||
'label' => 'Courier',
|
|
||||||
'commands' => array(
|
|
||||||
'zypper install courier-imap courier-authlib-mysql'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'etc_authlib_authdaemonrc' => '/etc/authlib/authdaemonrc',
|
|
||||||
'etc_authlib_authmysqlrc' => '/etc/authlib/authmysqlrc'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/courier-authdaemon restart',
|
|
||||||
'/etc/init.d/courier-pop restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'dovecot' => array(
|
|
||||||
'label' => 'Dovecot 1.1',
|
|
||||||
'commands_1' => array(
|
|
||||||
'zypper install dovecot11'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'etc_dovecot_dovecot.conf' => '/etc/dovecot/dovecot.conf',
|
|
||||||
'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf'
|
|
||||||
),
|
|
||||||
'commands_2' => array(
|
|
||||||
'chmod 0640 /etc/dovecot/dovecot-sql.conf'
|
|
||||||
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/dovecot restart'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'ftp' => array(
|
|
||||||
'label' => $lng['admin']['configfiles']['ftp'],
|
|
||||||
'daemons' => array(
|
|
||||||
'proftpd' => array(
|
|
||||||
'label' => 'ProFTPd',
|
|
||||||
'files' => array(
|
|
||||||
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
|
|
||||||
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/proftpd restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'pure-ftpd' => array(
|
|
||||||
'label' => 'Pure-FTPd',
|
|
||||||
'files' => array(
|
|
||||||
'etc_pure-ftpd.conf' => '/etc/pure-ftpd/pure-ftpd.conf',
|
|
||||||
'etc_pure-ftpd_mysql.conf' => '/etc/pure-ftpd/pure-ftpd-mysql.conf'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/pure-ftpd restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'etc' => array(
|
|
||||||
'label' => $lng['admin']['configfiles']['etc'],
|
|
||||||
'daemons' => array(
|
|
||||||
'cron' => array(
|
|
||||||
'label' => 'Crond (cronscript)',
|
|
||||||
'files' => array(
|
|
||||||
'etc_cron.d_froxlor' => '/etc/cron.d/froxlor'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
Settings::Get('system.crondreload')
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'awstats' => array(
|
|
||||||
'label' => 'Awstats',
|
|
||||||
'commands' => array(
|
|
||||||
'cp /usr/share/doc/packages/awstats/awstats.model.conf /etc/awstats/',
|
|
||||||
'sed -i.bak \'s/^DirData/# DirData/\''.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
|
||||||
'sed -i.bak \'s|^\\(DirIcons=\\).*$|\\1\\"/awstats-icon\\"|\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
|
||||||
'# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
@@ -1,418 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This file is part of the Froxlor project.
|
|
||||||
* Copyright (c) 2003-2009 the SysCP Team (see authors).
|
|
||||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the COPYING
|
|
||||||
* file that was distributed with this source code. You can also view the
|
|
||||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
*
|
|
||||||
* @copyright (c) the authors
|
|
||||||
* @author Florian Lippert <flo@syscp.org> (2003-2009)
|
|
||||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
|
||||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
* @package Configfiles
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Try to guess user/group from settings' email UID/GID
|
|
||||||
$vmail_user=posix_getpwuid(Settings::Get('system.vmail_uid'));
|
|
||||||
$vmail_group=posix_getgrgid(Settings::Get('system.vmail_gid'));
|
|
||||||
|
|
||||||
/* If one of them are not set, call it 'vmail' and suggest creating user/group
|
|
||||||
* in scripts. */
|
|
||||||
if ($vmail_user === false) {
|
|
||||||
$vmail_username="vmail";
|
|
||||||
} else {
|
|
||||||
$vmail_username=$vmail_user['name'];
|
|
||||||
}
|
|
||||||
if ($vmail_group === false) {
|
|
||||||
$vmail_groupname="vmail";
|
|
||||||
} else {
|
|
||||||
$vmail_groupname=$vmail_group['name'];
|
|
||||||
}
|
|
||||||
|
|
||||||
return array(
|
|
||||||
'debian_squeeze' => array(
|
|
||||||
'label' => 'Debian 6.0 (Squeeze) [deprecated]',
|
|
||||||
'services' => array(
|
|
||||||
'http' => array(
|
|
||||||
'label' => $lng['admin']['configfiles']['http'],
|
|
||||||
'daemons' => array(
|
|
||||||
'apache2' => array(
|
|
||||||
'label' => 'Apache 2',
|
|
||||||
'commands' => array(
|
|
||||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
|
||||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
|
||||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : '',
|
|
||||||
'mkdir -p ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
|
||||||
'chmod 1777 ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
|
||||||
'a2dismod userdir'
|
|
||||||
),
|
|
||||||
'files' => ((int)Settings::Get('phpfpm.enabled') == 1) ?
|
|
||||||
array(
|
|
||||||
'etc_apache2_mods-enabled_fastcgi.conf' => '/etc/apache2/mods-enabled/fastcgi.conf'
|
|
||||||
)
|
|
||||||
:
|
|
||||||
null,
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/apache2 restart'
|
|
||||||
),
|
|
||||||
),
|
|
||||||
'lighttpd' => array(
|
|
||||||
'label' => 'Lighttpd Webserver',
|
|
||||||
'commands_1' => array(
|
|
||||||
'apt-get install lighttpd',
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'etc_lighttpd.conf' => '/etc/lighttpd/lighttpd.conf',
|
|
||||||
),
|
|
||||||
'commands_2' => array(
|
|
||||||
$configcommand['vhost'],
|
|
||||||
$configcommand['diroptions'],
|
|
||||||
$configcommand['v_inclighty'],
|
|
||||||
$configcommand['d_inclighty'],
|
|
||||||
'lighty-disable-mod cgi',
|
|
||||||
'lighty-disable-mod fastcgi',
|
|
||||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
|
||||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
|
||||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : '',
|
|
||||||
'mkdir -p ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
|
||||||
'chmod 1777 ' . Settings::Get('system.mod_fcgid_tmpdir')
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/lighttpd restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'nginx' => array(
|
|
||||||
'label' => 'Nginx Webserver',
|
|
||||||
'commands_1' => array(
|
|
||||||
'apt-get install nginx php5-cgi',
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'etc_nginx_nginx.conf' => '/etc/nginx/nginx.conf',
|
|
||||||
'etc_init.d_php-fcgi' => '/etc/init.d/php-fcgi'
|
|
||||||
),
|
|
||||||
'commands_2' => array(
|
|
||||||
'rm /etc/nginx/sites-enabled/default',
|
|
||||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
|
||||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
|
||||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : '',
|
|
||||||
'mkdir -p ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
|
||||||
'chmod 1777 ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
|
||||||
'chmod u+x /etc/init.d/php-fcgi'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/php-fcgi start',
|
|
||||||
'/etc/init.d/nginx restart'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'dns' => array(
|
|
||||||
'label' => $lng['admin']['configfiles']['dns'],
|
|
||||||
'daemons' => array(
|
|
||||||
'bind' => array(
|
|
||||||
'label' => 'Bind9',
|
|
||||||
'commands' => array(
|
|
||||||
'apt-get install bind9',
|
|
||||||
'echo "include \"' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf\";" >> /etc/bind/named.conf',
|
|
||||||
'touch ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf',
|
|
||||||
'chown root:bind ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf',
|
|
||||||
'chmod 0644 ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/bind9 restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'powerdns' => array(
|
|
||||||
'label' => 'PowerDNS',
|
|
||||||
'files' => array(
|
|
||||||
'etc_powerdns_pdns.conf' => '/etc/powerdns/pdns.conf',
|
|
||||||
'etc_powerdns_pdns-froxlor.conf' => '/etc/powerdns/pdns_froxlor.conf',
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/pdns restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'smtp' => array(
|
|
||||||
'label' => $lng['admin']['configfiles']['smtp'],
|
|
||||||
'daemons' => array(
|
|
||||||
'postfix_courier' => array(
|
|
||||||
'label' => 'Postfix/Courier',
|
|
||||||
'commands' => array(
|
|
||||||
($vmail_group === false) ? 'groupadd -g ' . Settings::Get('system.vmail_gid') . ' '.$vmail_groupname : '',
|
|
||||||
($vmail_user === false) ? 'useradd -u ' . Settings::Get('system.vmail_uid') . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
|
||||||
'mkdir -p ' . Settings::Get('system.vmail_homedir'),
|
|
||||||
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . Settings::Get('system.vmail_homedir'),
|
|
||||||
'apt-get install postfix postfix-mysql libsasl2-2 libsasl2-modules libsasl2-modules-sql',
|
|
||||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
|
||||||
'mkdir -p /var/spool/postfix/var/run/mysqld',
|
|
||||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'touch /etc/postfix/mysql-virtual_sender_permissions.cf',
|
|
||||||
'touch /etc/postfix/sasl/smtpd.conf',
|
|
||||||
'chown root:root /etc/postfix/main.cf',
|
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_sender_permissions.cf',
|
|
||||||
'chown root:root /etc/postfix/sasl/smtpd.conf',
|
|
||||||
'chmod 0644 /etc/postfix/main.cf',
|
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_sender_permissions.cf',
|
|
||||||
'chmod 0600 /etc/postfix/sasl/smtpd.conf',
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
|
||||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'etc_postfix_mysql-virtual_sender_permissions.cf' => '/etc/postfix/mysql-virtual_sender_permissions.cf',
|
|
||||||
'etc_postfix_sasl_smtpd.conf' => '/etc/postfix/sasl/smtpd.conf'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'newaliases',
|
|
||||||
'/etc/init.d/postfix restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'dkim' => array(
|
|
||||||
'label' => 'DomainKey filter',
|
|
||||||
'commands_1' => array(
|
|
||||||
'apt-get install dkim-filter',
|
|
||||||
'mkdir -p /etc/postfix/dkim'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'dkim-filter.conf' => '/etc/dkim-filter.conf'
|
|
||||||
),
|
|
||||||
'commands_2' => array(
|
|
||||||
'echo "milter_default_action = accept" >> /etc/postfix/main.cf',
|
|
||||||
'echo "milter_protocol = 2" >> /etc/postfix/main.cf',
|
|
||||||
'echo "smtpd_milters = inet:localhost:8891" >> /etc/postfix/main.cf',
|
|
||||||
'echo "non_smtpd_milters = inet:localhost:8891" >> /etc/postfix/main.cf'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/dkim-filter restart',
|
|
||||||
'/etc/init.d/postfix restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'postfix_dovecot' => array(
|
|
||||||
'label' => 'Postfix/Dovecot',
|
|
||||||
'commands' => array(
|
|
||||||
($vmail_group === false) ? 'groupadd -g ' . Settings::Get('system.vmail_gid') . ' ' . $vmail_groupname : '',
|
|
||||||
($vmail_user === false) ? 'useradd -u ' . Settings::Get('system.vmail_uid') . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
|
||||||
'mkdir -p ' . Settings::Get('system.vmail_homedir'),
|
|
||||||
'chown -R ' . $vmail_username . ':' . $vmail_groupname . ' ' . Settings::Get('system.vmail_homedir'),
|
|
||||||
'apt-get install postfix postfix-mysql',
|
|
||||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
|
||||||
'mkdir -p /var/spool/postfix/var/run/mysqld',
|
|
||||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'touch /etc/postfix/mysql-virtual_sender_permissions.cf',
|
|
||||||
'chown root:root /etc/postfix/main.cf',
|
|
||||||
'chown root:root /etc/postfix/master.cf',
|
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'chown root:postfix /etc/postfix/mysql-virtual_sender_permissions.cf',
|
|
||||||
'chmod 0644 /etc/postfix/main.cf',
|
|
||||||
'chmod 0644 /etc/postfix/master.cf',
|
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'chmod 0640 /etc/postfix/mysql-virtual_sender_permissions.cf'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
|
||||||
'etc_postfix_master.cf' => '/etc/postfix/master.cf',
|
|
||||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
|
||||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
|
||||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
|
||||||
'etc_postfix_mysql-virtual_sender_permissions.cf' => '/etc/postfix/mysql-virtual_sender_permissions.cf'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/postfix restart',
|
|
||||||
'newaliases'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'postfix_mxaccess' => array(
|
|
||||||
'label' => 'Postfix MX-Access (anti spam)',
|
|
||||||
'files' => array(
|
|
||||||
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
|
|
||||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
|
|
||||||
),
|
|
||||||
'commands_1' => array(
|
|
||||||
'postmap /etc/postfix/mx_access'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/postfix restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'exim4' => array(
|
|
||||||
'label' => 'Exim4',
|
|
||||||
'commands_1' => array(
|
|
||||||
'dpkg-reconfigure exim4-config',
|
|
||||||
'# choose "no configuration at this time" and "splitted configuration files" in the dialog'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'etc_exim4_conf.d_acl_30_exim4-config_check_rcpt.rul' => '/etc/exim4/conf.d/acl/30_exim4-config_check_rcpt.rul',
|
|
||||||
'etc_exim4_conf.d_auth_30_froxlor-config' => '/etc/exim4/conf.d/auth/30_froxlor-config',
|
|
||||||
'etc_exim4_conf.d_main_10_froxlor-config_options' => '/etc/exim4/conf.d/main/10_froxlor-config_options',
|
|
||||||
'etc_exim4_conf.d_router_180_froxlor-config' => '/etc/exim4/conf.d/router/180_froxlor-config',
|
|
||||||
'etc_exim4_conf.d_transport_30_froxlor-config' => '/etc/exim4/conf.d/transport/30_froxlor-config'
|
|
||||||
),
|
|
||||||
'commands_2' => array(
|
|
||||||
'chmod o-rx /var/lib/exim4',
|
|
||||||
'chmod o-rx /etc/exim4/conf.d/main/10_froxlor-config_options'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/exim4 restart'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'mail' => array(
|
|
||||||
'label' => $lng['admin']['configfiles']['mail'],
|
|
||||||
'daemons' => array(
|
|
||||||
'courier' => array(
|
|
||||||
'label' => 'Courier',
|
|
||||||
'commands' => array(
|
|
||||||
'apt-get install courier-pop courier-imap courier-authlib-mysql'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'etc_courier_authdaemonrc' => '/etc/courier/authdaemonrc',
|
|
||||||
'etc_courier_authmysqlrc' => '/etc/courier/authmysqlrc'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/courier-authdaemon restart',
|
|
||||||
'/etc/init.d/courier-pop restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'dovecot' => array(
|
|
||||||
'label' => 'Dovecot',
|
|
||||||
'commands_1' => array(
|
|
||||||
'apt-get install dovecot-imapd dovecot-pop3d'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'etc_dovecot_dovecot.conf' => '/etc/dovecot/dovecot.conf',
|
|
||||||
'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf'
|
|
||||||
),
|
|
||||||
'commands_2' => array(
|
|
||||||
'chmod 0640 /etc/dovecot/dovecot-sql.conf'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/dovecot restart'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'ftp' => array(
|
|
||||||
'label' => $lng['admin']['configfiles']['ftp'],
|
|
||||||
'daemons' => array(
|
|
||||||
'proftpd' => array(
|
|
||||||
'label' => 'ProFTPd',
|
|
||||||
'commands' => array(
|
|
||||||
'apt-get install proftpd-basic proftpd-mod-mysql'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'etc_proftpd_sql.conf' => '/etc/proftpd/sql.conf',
|
|
||||||
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
|
|
||||||
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/proftpd restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'pure-ftpd' => array(
|
|
||||||
'label' => 'Pure FTPd',
|
|
||||||
'commands_1' => array(
|
|
||||||
'apt-get install pure-ftpd-common pure-ftpd-mysql'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'etc_pure-ftpd_conf_MinUID' => '/etc/pure-ftpd/conf/MinUID',
|
|
||||||
'etc_pure-ftpd_conf_MySQLConfigFile' => '/etc/pure-ftpd/conf/MySQLConfigFile',
|
|
||||||
'etc_pure-ftpd_conf_NoAnonymous' => '/etc/pure-ftpd/conf/NoAnonymous',
|
|
||||||
'etc_pure-ftpd_conf_MaxIdleTime' => '/etc/pure-ftpd/conf/MaxIdleTime',
|
|
||||||
'etc_pure-ftpd_conf_ChrootEveryone' => '/etc/pure-ftpd/conf/ChrootEveryone',
|
|
||||||
'etc_pure-ftpd_conf_PAMAuthentication' => '/etc/pure-ftpd/conf/PAMAuthentication',
|
|
||||||
'etc_pure-ftpd_db_mysql.conf' => '/etc/pure-ftpd/db/mysql.conf',
|
|
||||||
'etc_pure-ftpd_conf_CustomerProof' => '/etc/pure-ftpd/conf/CustomerProof',
|
|
||||||
'etc_pure-ftpd_conf_Bind' => '/etc/pure-ftpd/conf/Bind',
|
|
||||||
'etc_default_pure-ftpd-common' => '/etc/default/pure-ftpd-common'
|
|
||||||
),
|
|
||||||
'commands_2' => array(
|
|
||||||
'chmod 0640 /etc/pure-ftpd/db/mysql.conf'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/pure-ftpd-mysql restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'etc' => array(
|
|
||||||
'label' => $lng['admin']['configfiles']['etc'],
|
|
||||||
'daemons' => array(
|
|
||||||
'cron' => array(
|
|
||||||
'label' => 'Crond (cronscript)',
|
|
||||||
'files' => array(
|
|
||||||
'etc_cron.d_froxlor' => '/etc/cron.d/froxlor'
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
Settings::Get('system.crondreload')
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'awstats' => array(
|
|
||||||
'label' => 'Awstats',
|
|
||||||
'commands' => array(
|
|
||||||
'apt-get install awstats',
|
|
||||||
'cp /usr/share/awstats/tools/awstats_buildstaticpages.pl '.makeCorrectDir(Settings::Get('system.awstats_path')),
|
|
||||||
'mv '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.conf').' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
|
||||||
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
|
||||||
'sed -i.bak \'s|^\\(DirIcons=\\).*$|\\1\\"/awstats-icon\\"|\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
|
||||||
'# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself',
|
|
||||||
'rm /etc/cron.d/awstats'
|
|
||||||
),
|
|
||||||
),
|
|
||||||
'libnss' => array(
|
|
||||||
'label' => 'libnss (system login with mysql)',
|
|
||||||
'commands' => array(
|
|
||||||
'apt-get install libnss-mysql nscd',
|
|
||||||
'chmod 600 /etc/nss-mysql.conf /etc/nss-mysql-root.conf'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'etc_nss-mysql.conf' => '/etc/nss-mysql.conf',
|
|
||||||
'etc_nss-mysql-root.conf' => '/etc/nss-mysql-root.conf',
|
|
||||||
'etc_nsswitch.conf' => '/etc/nsswitch.conf',
|
|
||||||
),
|
|
||||||
'restart' => array(
|
|
||||||
'/etc/init.d/nscd restart'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'logrotate' => array(
|
|
||||||
'label' => 'Logrotate',
|
|
||||||
'commands_1' => array(
|
|
||||||
'apt-get install logrotate',
|
|
||||||
'touch /etc/logrotate.d/froxlor',
|
|
||||||
'chmod 644 /etc/logrotate.d/froxlor'
|
|
||||||
),
|
|
||||||
'files' => array(
|
|
||||||
'etc_logrotated_froxlor' => '/etc/logrotate.d/froxlor'
|
|
||||||
),
|
|
||||||
'commands_2' => array(
|
|
||||||
'# apt automatically adds a daily cronjob for logrotate',
|
|
||||||
'# you do not have to do anything else :)'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
@@ -259,6 +259,16 @@ fastcgi_param REDIRECT_STATUS 200;
|
|||||||
</visibility>
|
</visibility>
|
||||||
<content><![CDATA[
|
<content><![CDATA[
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: php-fcgi
|
||||||
|
# Required-Start: $remote_fs $syslog
|
||||||
|
# Required-Stop: $remote_fs $syslog
|
||||||
|
# Default-Start: 2 3 4 5
|
||||||
|
# Default-Stop: 0 1 6
|
||||||
|
# Short-Description: php-fcgi initscript
|
||||||
|
# Description: Custom php-fcgi initscript for Froxlor
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
BIND="127.0.0.1:8888"
|
BIND="127.0.0.1:8888"
|
||||||
USER="www-data"
|
USER="www-data"
|
||||||
PHP_FCGI_CHILDREN="15"
|
PHP_FCGI_CHILDREN="15"
|
||||||
|
|||||||
@@ -299,6 +299,16 @@ fastcgi_param REDIRECT_STATUS 200;
|
|||||||
</visibility>
|
</visibility>
|
||||||
<content><![CDATA[
|
<content><![CDATA[
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: php-fcgi
|
||||||
|
# Required-Start: $remote_fs $syslog
|
||||||
|
# Required-Stop: $remote_fs $syslog
|
||||||
|
# Default-Start: 2 3 4 5
|
||||||
|
# Default-Stop: 0 1 6
|
||||||
|
# Short-Description: php-fcgi initscript
|
||||||
|
# Description: Custom php-fcgi initscript for Froxlor
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
BIND="127.0.0.1:8888"
|
BIND="127.0.0.1:8888"
|
||||||
USER="www-data"
|
USER="www-data"
|
||||||
PHP_FCGI_CHILDREN="15"
|
PHP_FCGI_CHILDREN="15"
|
||||||
|
|||||||
@@ -1,58 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This file is part of the Froxlor project.
|
|
||||||
* Copyright (c) 2003-2009 the SysCP Team (see authors).
|
|
||||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the COPYING
|
|
||||||
* file that was distributed with this source code. You can also view the
|
|
||||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
*
|
|
||||||
* @copyright (c) the authors
|
|
||||||
* @author Florian Lippert <flo@syscp.org> (2003-2009)
|
|
||||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
|
||||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
* @package Lib
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
$configcommand = array();
|
|
||||||
|
|
||||||
$vhostDir = new frxDirectory(Settings::Get('system.apacheconf_vhost'));
|
|
||||||
$optsDir = new frxDirectory(Settings::Get('system.apacheconf_diroptions'));
|
|
||||||
|
|
||||||
if ($vhostDir->isConfigDir()) {
|
|
||||||
$configcommand['vhost'] = 'mkdir -p ' . Settings::Get('system.apacheconf_vhost');
|
|
||||||
$configcommand['v_inclighty'] = 'echo -e \'\\ninclude_shell "cat ' . makeCorrectDir(Settings::Get('system.apacheconf_vhost')) . '*.conf"\' >> /etc/lighttpd/lighttpd.conf';
|
|
||||||
// this is only used for SUSE - can we check whether this is still needed?
|
|
||||||
$configcommand['include'] = 'echo -e "\\nInclude ' . makeCorrectDir(Settings::Get('system.apacheconf_vhost')) . '*.conf" >> ' . makeCorrectFile(makeCorrectDir('/etc/apache2/httpd.conf'));
|
|
||||||
} else {
|
|
||||||
$configcommand['vhost'] = 'touch ' . Settings::Get('system.apacheconf_vhost');
|
|
||||||
$configcommand['v_inclighty'] = 'echo -e \'\\ninclude "' . Settings::Get('system.apacheconf_vhost') . '"\' >> /etc/lighttpd/lighttpd.conf';
|
|
||||||
// this is only used for SUSE - can we check whether this is still needed?
|
|
||||||
$configcommand['include'] = 'echo -e "\\nInclude ' . Settings::Get('system.apacheconf_vhost') . '" >> ' . makeCorrectFile('/etc/apache2/httpd.conf');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($optsDir->isConfigDir()) {
|
|
||||||
$configcommand['diroptions'] = 'mkdir -p ' . Settings::Get('system.apacheconf_diroptions');
|
|
||||||
$configcommand['d_inclighty'] = 'echo -e \'\\ninclude_shell "cat ' . makeCorrectDir(Settings::Get('system.apacheconf_diroptions')) . '*.conf"\' >> /etc/lighttpd/lighttpd.conf';
|
|
||||||
} else {
|
|
||||||
$configcommand['diroptions'] = 'touch ' . Settings::Get('system.apacheconf_diroptions');
|
|
||||||
$configcommand['d_inclighty'] = 'echo -e \'\\ninclude "' . Settings::Get('system.apacheconf_diroptions') . '"\' >> /etc/lighttpd/lighttpd.conf';
|
|
||||||
}
|
|
||||||
|
|
||||||
$cfgPath = 'lib/configfiles/';
|
|
||||||
$configfiles = array();
|
|
||||||
$configfiles = array_merge(
|
|
||||||
include $cfgPath . 'rhel7.inc.php',
|
|
||||||
include $cfgPath . 'wheezy.inc.php',
|
|
||||||
include $cfgPath . 'squeeze.inc.php',
|
|
||||||
include $cfgPath . 'trusty.inc.php',
|
|
||||||
include $cfgPath . 'precise.inc.php',
|
|
||||||
include $cfgPath . 'lucid.inc.php',
|
|
||||||
include $cfgPath . 'gentoo.inc.php',
|
|
||||||
include $cfgPath . 'sle11.inc.php',
|
|
||||||
include $cfgPath . 'sle10.inc.php',
|
|
||||||
include $cfgPath . 'freebsd.inc.php'
|
|
||||||
);
|
|
||||||
232
lib/formfields/admin/admin/formfield.admin_add.php
Normal file
232
lib/formfields/admin/admin/formfield.admin_add.php
Normal file
@@ -0,0 +1,232 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file is part of the Froxlor project.
|
||||||
|
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the COPYING
|
||||||
|
* file that was distributed with this source code. You can also view the
|
||||||
|
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
*
|
||||||
|
* @copyright (c) the authors
|
||||||
|
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||||
|
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
* @package Formfields
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'admin_add' => array(
|
||||||
|
'title' => $lng['admin']['admin_add'],
|
||||||
|
'image' => 'icons/user_add.png',
|
||||||
|
'sections' => array(
|
||||||
|
'section_a' => array(
|
||||||
|
'title' => $lng['admin']['accountdata'],
|
||||||
|
'image' => 'icons/user_add.png',
|
||||||
|
'fields' => array(
|
||||||
|
'loginname' => array(
|
||||||
|
'label' => $lng['login']['username'],
|
||||||
|
'type' => 'text',
|
||||||
|
'mandatory' => true
|
||||||
|
),
|
||||||
|
'admin_password' => array(
|
||||||
|
'label' => $lng['login']['password'],
|
||||||
|
'type' => 'password',
|
||||||
|
'mandatory' => true,
|
||||||
|
'autocomplete' => 'off'
|
||||||
|
),
|
||||||
|
'admin_password_suggestion' => array(
|
||||||
|
'label' => $lng['customer']['generated_pwd'],
|
||||||
|
'type' => 'text',
|
||||||
|
'visible' => (Settings::Get('panel.password_regex') == ''),
|
||||||
|
'value' => generatePassword(),
|
||||||
|
),
|
||||||
|
'def_language' => array(
|
||||||
|
'label' => $lng['login']['language'],
|
||||||
|
'type' => 'select',
|
||||||
|
'select_var' => $language_options
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'section_b' => array(
|
||||||
|
'title' => $lng['admin']['contactdata'],
|
||||||
|
'image' => 'icons/user_add.png',
|
||||||
|
'fields' => array(
|
||||||
|
'name' => array(
|
||||||
|
'label' => $lng['customer']['name'],
|
||||||
|
'type' => 'text',
|
||||||
|
'mandatory' => true
|
||||||
|
),
|
||||||
|
'email' => array(
|
||||||
|
'label' => $lng['customer']['email'],
|
||||||
|
'type' => 'text',
|
||||||
|
'mandatory' => true
|
||||||
|
),
|
||||||
|
'custom_notes' => array(
|
||||||
|
'style' => 'align-top',
|
||||||
|
'label' => $lng['usersettings']['custom_notes']['title'],
|
||||||
|
'desc' => $lng['usersettings']['custom_notes']['description'],
|
||||||
|
'type' => 'textarea',
|
||||||
|
'cols' => 60,
|
||||||
|
'rows' => 12
|
||||||
|
),
|
||||||
|
'custom_notes_show' => array(
|
||||||
|
'label' => $lng['usersettings']['custom_notes']['show'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'section_c' => array(
|
||||||
|
'title' => $lng['admin']['servicedata'],
|
||||||
|
'image' => 'icons/user_add.png',
|
||||||
|
'fields' => array(
|
||||||
|
'ipaddress' => array(
|
||||||
|
'label' => $lng['serversettings']['ipaddress']['title'],
|
||||||
|
'type' => 'select',
|
||||||
|
'select_var' => $ipaddress
|
||||||
|
),
|
||||||
|
'change_serversettings' => array(
|
||||||
|
'label' => $lng['admin']['change_serversettings'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array()
|
||||||
|
),
|
||||||
|
'customers' => array(
|
||||||
|
'label' => $lng['admin']['customers'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => 0,
|
||||||
|
'maxlength' => 9,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $customers_ul
|
||||||
|
),
|
||||||
|
'customers_see_all' => array(
|
||||||
|
'label' => $lng['admin']['customers_see_all'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array()
|
||||||
|
),
|
||||||
|
'domains' => array(
|
||||||
|
'label' => $lng['admin']['domains'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => 0,
|
||||||
|
'maxlength' => 9,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $domains_ul
|
||||||
|
),
|
||||||
|
'domains_see_all' => array(
|
||||||
|
'label' => $lng['admin']['domains_see_all'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array()
|
||||||
|
),
|
||||||
|
'caneditphpsettings' => array(
|
||||||
|
'label' => $lng['admin']['caneditphpsettings'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array()
|
||||||
|
),
|
||||||
|
'diskspace' => array(
|
||||||
|
'label' => $lng['customer']['diskspace'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => 0,
|
||||||
|
'maxlength' => 6,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $diskspace_ul
|
||||||
|
),
|
||||||
|
'traffic' => array(
|
||||||
|
'label' => $lng['customer']['traffic'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => 0,
|
||||||
|
'maxlength' => 4,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $traffic_ul
|
||||||
|
),
|
||||||
|
'subdomains' => array(
|
||||||
|
'label' => $lng['customer']['subdomains'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => 0,
|
||||||
|
'maxlength' => 9,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $subdomains_ul
|
||||||
|
),
|
||||||
|
'emails' => array(
|
||||||
|
'label' => $lng['customer']['emails'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => 0,
|
||||||
|
'maxlength' => 9,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $emails_ul
|
||||||
|
),
|
||||||
|
'email_accounts' => array(
|
||||||
|
'label' => $lng['customer']['accounts'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => 0,
|
||||||
|
'maxlength' => 9,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $email_accounts_ul
|
||||||
|
),
|
||||||
|
'email_forwarders' => array(
|
||||||
|
'label' => $lng['customer']['forwarders'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => 0,
|
||||||
|
'maxlength' => 9,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $email_forwarders_ul
|
||||||
|
),
|
||||||
|
'email_quota' => array(
|
||||||
|
'label' => $lng['customer']['email_quota'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => 0,
|
||||||
|
'maxlength' => 9,
|
||||||
|
'visible' => (Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $email_quota_ul
|
||||||
|
),
|
||||||
|
'ftps' => array(
|
||||||
|
'label' => $lng['customer']['ftps'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => 0,
|
||||||
|
'maxlength' => 9,
|
||||||
|
'ul_field' => $ftps_ul
|
||||||
|
),
|
||||||
|
'tickets' => array(
|
||||||
|
'label' => $lng['customer']['tickets'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => 0,
|
||||||
|
'maxlength' => 9,
|
||||||
|
'visible' => (Settings::Get('ticket.enabled') == '1' ? true : false),
|
||||||
|
'ul_field' => $tickets_ul
|
||||||
|
),
|
||||||
|
'tickets_see_all' => array(
|
||||||
|
'label' => $lng['admin']['tickets_see_all'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array()
|
||||||
|
),
|
||||||
|
'mysqls' => array(
|
||||||
|
'label' => $lng['customer']['mysqls'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => 0,
|
||||||
|
'maxlength' => 9,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $mysqls_ul
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
247
lib/formfields/admin/admin/formfield.admin_edit.php
Normal file
247
lib/formfields/admin/admin/formfield.admin_edit.php
Normal file
@@ -0,0 +1,247 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file is part of the Froxlor project.
|
||||||
|
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the COPYING
|
||||||
|
* file that was distributed with this source code. You can also view the
|
||||||
|
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
*
|
||||||
|
* @copyright (c) the authors
|
||||||
|
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||||
|
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
* @package Formfields
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'admin_edit' => array(
|
||||||
|
'title' => $lng['admin']['admin_edit'],
|
||||||
|
'image' => 'icons/user_edit.png',
|
||||||
|
'sections' => array(
|
||||||
|
'section_a' => array(
|
||||||
|
'title' => $lng['admin']['accountdata'],
|
||||||
|
'image' => 'icons/user_edit.png',
|
||||||
|
'fields' => array(
|
||||||
|
'loginname' => array(
|
||||||
|
'label' => $lng['login']['username'],
|
||||||
|
'type' => 'label',
|
||||||
|
'value' => $result['loginname']
|
||||||
|
),
|
||||||
|
'deactivated' => array(
|
||||||
|
'label' => $lng['admin']['deactivated_user'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array($result['deactivated']),
|
||||||
|
'visible' => ($result['adminid'] == $userinfo['userid'] ? false : true)
|
||||||
|
),
|
||||||
|
'admin_password' => array(
|
||||||
|
'label' => $lng['login']['password'].' ('.$lng['panel']['emptyfornochanges'].')',
|
||||||
|
'type' => 'password',
|
||||||
|
'autocomplete' => 'off',
|
||||||
|
'visible' => ($result['adminid'] == $userinfo['userid'] ? false : true)
|
||||||
|
),
|
||||||
|
'admin_password_suggestion' => array(
|
||||||
|
'label' => $lng['customer']['generated_pwd'],
|
||||||
|
'type' => 'text',
|
||||||
|
'visible' => (Settings::Get('panel.password_regex') == ''),
|
||||||
|
'value' => generatePassword(),
|
||||||
|
'visible' => ($result['adminid'] == $userinfo['userid'] ? false : true)
|
||||||
|
),
|
||||||
|
'def_language' => array(
|
||||||
|
'label' => $lng['login']['language'],
|
||||||
|
'type' => 'select',
|
||||||
|
'select_var' => $language_options,
|
||||||
|
'visible' => ($result['adminid'] == $userinfo['userid'] ? false : true)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'section_b' => array(
|
||||||
|
'title' => $lng['admin']['contactdata'],
|
||||||
|
'image' => 'icons/user_edit.png',
|
||||||
|
'fields' => array(
|
||||||
|
'name' => array(
|
||||||
|
'label' => $lng['customer']['name'],
|
||||||
|
'type' => 'text',
|
||||||
|
'mandatory' => true,
|
||||||
|
'value' => $result['name']
|
||||||
|
),
|
||||||
|
'email' => array(
|
||||||
|
'label' => $lng['customer']['email'],
|
||||||
|
'type' => 'text',
|
||||||
|
'mandatory' => true,
|
||||||
|
'value' => $result['email']
|
||||||
|
),
|
||||||
|
'custom_notes' => array(
|
||||||
|
'style' => 'align-top',
|
||||||
|
'label' => $lng['usersettings']['custom_notes']['title'],
|
||||||
|
'desc' => $lng['usersettings']['custom_notes']['description'],
|
||||||
|
'type' => 'textarea',
|
||||||
|
'cols' => 60,
|
||||||
|
'rows' => 12,
|
||||||
|
'value' => $result['custom_notes']
|
||||||
|
),
|
||||||
|
'custom_notes_show' => array(
|
||||||
|
'label' => $lng['usersettings']['custom_notes']['show'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array($result['custom_notes_show'])
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'section_c' => array(
|
||||||
|
'title' => $lng['admin']['servicedata'],
|
||||||
|
'image' => 'icons/user_add.png',
|
||||||
|
'visible' => ($result['adminid'] != $userinfo['userid'] ? true : false),
|
||||||
|
'fields' => array(
|
||||||
|
'ipaddress' => array(
|
||||||
|
'label' => $lng['serversettings']['ipaddress']['title'],
|
||||||
|
'type' => 'select',
|
||||||
|
'select_var' => $ipaddress
|
||||||
|
),
|
||||||
|
'change_serversettings' => array(
|
||||||
|
'label' => $lng['admin']['change_serversettings'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array($result['change_serversettings'])
|
||||||
|
),
|
||||||
|
'customers' => array(
|
||||||
|
'label' => $lng['admin']['customers'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => $result['customers'],
|
||||||
|
'maxlength' => 9,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $customers_ul
|
||||||
|
),
|
||||||
|
'customers_see_all' => array(
|
||||||
|
'label' => $lng['admin']['customers_see_all'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array($result['customers_see_all'])
|
||||||
|
),
|
||||||
|
'domains' => array(
|
||||||
|
'label' => $lng['admin']['domains'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => $result['domains'],
|
||||||
|
'maxlength' => 9,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $domains_ul
|
||||||
|
),
|
||||||
|
'domains_see_all' => array(
|
||||||
|
'label' => $lng['admin']['domains_see_all'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array($result['domains_see_all'])
|
||||||
|
),
|
||||||
|
'caneditphpsettings' => array(
|
||||||
|
'label' => $lng['admin']['caneditphpsettings'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array($result['caneditphpsettings'])
|
||||||
|
),
|
||||||
|
'diskspace' => array(
|
||||||
|
'label' => $lng['customer']['diskspace'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => $result['diskspace'],
|
||||||
|
'maxlength' => 6,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $diskspace_ul
|
||||||
|
),
|
||||||
|
'traffic' => array(
|
||||||
|
'label' => $lng['customer']['traffic'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => $result['traffic'],
|
||||||
|
'maxlength' => 4,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $traffic_ul
|
||||||
|
),
|
||||||
|
'subdomains' => array(
|
||||||
|
'label' => $lng['customer']['subdomains'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => $result['subdomains'],
|
||||||
|
'maxlength' => 9,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $subdomains_ul
|
||||||
|
),
|
||||||
|
'emails' => array(
|
||||||
|
'label' => $lng['customer']['emails'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => $result['emails'],
|
||||||
|
'maxlength' => 9,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $emails_ul
|
||||||
|
),
|
||||||
|
'email_accounts' => array(
|
||||||
|
'label' => $lng['customer']['accounts'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => $result['email_accounts'],
|
||||||
|
'maxlength' => 9,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $email_accounts_ul
|
||||||
|
),
|
||||||
|
'email_forwarders' => array(
|
||||||
|
'label' => $lng['customer']['forwarders'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => $result['email_forwarders'],
|
||||||
|
'maxlength' => 9,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $email_forwarders_ul
|
||||||
|
),
|
||||||
|
'email_quota' => array(
|
||||||
|
'label' => $lng['customer']['email_quota'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => $result['email_quota'],
|
||||||
|
'maxlength' => 9,
|
||||||
|
'visible' => (Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $email_quota_ul
|
||||||
|
),
|
||||||
|
'ftps' => array(
|
||||||
|
'label' => $lng['customer']['ftps'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => $result['ftps'],
|
||||||
|
'maxlength' => 9,
|
||||||
|
'ul_field' => $ftps_ul
|
||||||
|
),
|
||||||
|
'tickets' => array(
|
||||||
|
'label' => $lng['customer']['tickets'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => $result['tickets'],
|
||||||
|
'maxlength' => 9,
|
||||||
|
'visible' => (Settings::Get('ticket.enabled') == '1' ? true : false),
|
||||||
|
'ul_field' => $tickets_ul
|
||||||
|
),
|
||||||
|
'tickets_see_all' => array(
|
||||||
|
'label' => $lng['admin']['tickets_see_all'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array($result['tickets_see_all'])
|
||||||
|
),
|
||||||
|
'mysqls' => array(
|
||||||
|
'label' => $lng['customer']['mysqls'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => $result['mysqls'],
|
||||||
|
'maxlength' => 9,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $mysqls_ul
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
54
lib/formfields/admin/cronjobs/formfield.cronjobs_edit.php
Normal file
54
lib/formfields/admin/cronjobs/formfield.cronjobs_edit.php
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file is part of the Froxlor project.
|
||||||
|
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the COPYING
|
||||||
|
* file that was distributed with this source code. You can also view the
|
||||||
|
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
*
|
||||||
|
* @copyright (c) the authors
|
||||||
|
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||||
|
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
* @package Formfields
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'cronjobs_edit' => array(
|
||||||
|
'title' => $lng['admin']['cronjob_edit'],
|
||||||
|
'image' => 'icons/clock_edit.png',
|
||||||
|
'sections' => array(
|
||||||
|
'section_a' => array(
|
||||||
|
'title' => $lng['cronjob']['cronjobsettings'],
|
||||||
|
'image' => 'icons/clock_edit.png',
|
||||||
|
'fields' => array(
|
||||||
|
'cronfile' => array(
|
||||||
|
'label' => 'Cronjob',
|
||||||
|
'type' => ($change_cronfile == 1 ? 'text' : 'label'),
|
||||||
|
'value' => $result['cronfile']
|
||||||
|
),
|
||||||
|
'isactive' => array(
|
||||||
|
'label' => $lng['admin']['activated'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array($result['isactive'])
|
||||||
|
),
|
||||||
|
'interval_value' => array(
|
||||||
|
'label' => $lng['cronjob']['cronjobintervalv'],
|
||||||
|
'type' => 'text',
|
||||||
|
'value' => $interval_value
|
||||||
|
),
|
||||||
|
'interval_interval' => array(
|
||||||
|
'label' => $lng['cronjob']['cronjobinterval'],
|
||||||
|
'type' => 'select',
|
||||||
|
'select_var' => $interval_interval
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
265
lib/formfields/admin/customer/formfield.customer_add.php
Normal file
265
lib/formfields/admin/customer/formfield.customer_add.php
Normal file
@@ -0,0 +1,265 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file is part of the Froxlor project.
|
||||||
|
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the COPYING
|
||||||
|
* file that was distributed with this source code. You can also view the
|
||||||
|
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
*
|
||||||
|
* @copyright (c) the authors
|
||||||
|
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||||
|
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
* @package Formfields
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'customer_add' => array(
|
||||||
|
'title' => $lng['admin']['customer_add'],
|
||||||
|
'image' => 'icons/user_add.png',
|
||||||
|
'sections' => array(
|
||||||
|
'section_a' => array(
|
||||||
|
'title' => $lng['admin']['accountdata'],
|
||||||
|
'image' => 'icons/user_add.png',
|
||||||
|
'fields' => array(
|
||||||
|
'new_loginname' => array(
|
||||||
|
'label' => $lng['login']['username'],
|
||||||
|
'type' => 'text'
|
||||||
|
),
|
||||||
|
'createstdsubdomain' => array(
|
||||||
|
'label' => $lng['admin']['stdsubdomain_add'].'?',
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array('1')
|
||||||
|
),
|
||||||
|
'store_defaultindex' => array(
|
||||||
|
'label' => $lng['admin']['store_defaultindex'].'?',
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array('1')
|
||||||
|
),
|
||||||
|
'new_customer_password' => array(
|
||||||
|
'label' => $lng['login']['password'],
|
||||||
|
'type' => 'password',
|
||||||
|
'autocomplete' => 'off'
|
||||||
|
),
|
||||||
|
'new_customer_password_suggestion' => array(
|
||||||
|
'label' => $lng['customer']['generated_pwd'],
|
||||||
|
'type' => 'text',
|
||||||
|
'visible' => (Settings::Get('panel.password_regex') == ''),
|
||||||
|
'value' => generatePassword(),
|
||||||
|
),
|
||||||
|
'sendpassword' => array(
|
||||||
|
'label' => $lng['admin']['sendpassword'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array('1')
|
||||||
|
),
|
||||||
|
'def_language' => array(
|
||||||
|
'label' => $lng['login']['language'],
|
||||||
|
'type' => 'select',
|
||||||
|
'select_var' => $language_options
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'section_b' => array(
|
||||||
|
'title' => $lng['admin']['contactdata'],
|
||||||
|
'image' => 'icons/user_add.png',
|
||||||
|
'fields' => array(
|
||||||
|
'name' => array(
|
||||||
|
'label' => $lng['customer']['name'],
|
||||||
|
'type' => 'text',
|
||||||
|
'mandatory_ex' => true
|
||||||
|
),
|
||||||
|
'firstname' => array(
|
||||||
|
'label' => $lng['customer']['firstname'],
|
||||||
|
'type' => 'text',
|
||||||
|
'mandatory_ex' => true
|
||||||
|
),
|
||||||
|
'gender' => array(
|
||||||
|
'label' => $lng['gender']['title'],
|
||||||
|
'type' => 'select',
|
||||||
|
'select_var' => $gender_options
|
||||||
|
),
|
||||||
|
'company' => array(
|
||||||
|
'label' => $lng['customer']['company'],
|
||||||
|
'type' => 'text',
|
||||||
|
'mandatory_ex' => true
|
||||||
|
),
|
||||||
|
'street' => array(
|
||||||
|
'label' => $lng['customer']['street'],
|
||||||
|
'type' => 'text'
|
||||||
|
),
|
||||||
|
'zipcode' => array(
|
||||||
|
'label' => $lng['customer']['zipcode'],
|
||||||
|
'type' => 'text'
|
||||||
|
),
|
||||||
|
'city' => array(
|
||||||
|
'label' => $lng['customer']['city'],
|
||||||
|
'type' => 'text'
|
||||||
|
),
|
||||||
|
'phone' => array(
|
||||||
|
'label' => $lng['customer']['phone'],
|
||||||
|
'type' => 'text'
|
||||||
|
),
|
||||||
|
'fax' => array(
|
||||||
|
'label' => $lng['customer']['fax'],
|
||||||
|
'type' => 'text'
|
||||||
|
),
|
||||||
|
'email' => array(
|
||||||
|
'label' => $lng['customer']['email'],
|
||||||
|
'type' => 'text',
|
||||||
|
'mandatory' => true
|
||||||
|
),
|
||||||
|
'customernumber' => array(
|
||||||
|
'label' => $lng['customer']['customernumber'],
|
||||||
|
'type' => 'text'
|
||||||
|
),
|
||||||
|
'custom_notes' => array(
|
||||||
|
'style' => 'align-top',
|
||||||
|
'label' => $lng['usersettings']['custom_notes']['title'],
|
||||||
|
'desc' => $lng['usersettings']['custom_notes']['description'],
|
||||||
|
'type' => 'textarea',
|
||||||
|
'cols' => 60,
|
||||||
|
'rows' => 12
|
||||||
|
),
|
||||||
|
'custom_notes_show' => array(
|
||||||
|
'label' => $lng['usersettings']['custom_notes']['show'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'section_c' => array(
|
||||||
|
'title' => $lng['admin']['servicedata'],
|
||||||
|
'image' => 'icons/user_add.png',
|
||||||
|
'fields' => array(
|
||||||
|
'diskspace' => array(
|
||||||
|
'label' => $lng['customer']['diskspace'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => 0,
|
||||||
|
'maxlength' => 6,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $diskspace_ul
|
||||||
|
),
|
||||||
|
'traffic' => array(
|
||||||
|
'label' => $lng['customer']['traffic'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => 0,
|
||||||
|
'maxlength' => 4,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $traffic_ul
|
||||||
|
),
|
||||||
|
'subdomains' => array(
|
||||||
|
'label' => $lng['customer']['subdomains'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => 0,
|
||||||
|
'maxlength' => 9,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $subdomains_ul
|
||||||
|
),
|
||||||
|
'emails' => array(
|
||||||
|
'label' => $lng['customer']['emails'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => 0,
|
||||||
|
'maxlength' => 9,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $emails_ul
|
||||||
|
),
|
||||||
|
'email_accounts' => array(
|
||||||
|
'label' => $lng['customer']['accounts'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => 0,
|
||||||
|
'maxlength' => 9,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $email_accounts_ul
|
||||||
|
),
|
||||||
|
'email_forwarders' => array(
|
||||||
|
'label' => $lng['customer']['forwarders'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => 0,
|
||||||
|
'maxlength' => 9,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $email_forwarders_ul
|
||||||
|
),
|
||||||
|
'email_quota' => array(
|
||||||
|
'label' => $lng['customer']['email_quota'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => 0,
|
||||||
|
'maxlength' => 9,
|
||||||
|
'visible' => (Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $email_quota_ul
|
||||||
|
),
|
||||||
|
'email_imap' => array(
|
||||||
|
'label' => $lng['customer']['email_imap'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array('1'),
|
||||||
|
'mandatory' => true
|
||||||
|
),
|
||||||
|
'email_pop3' => array(
|
||||||
|
'label' => $lng['customer']['email_pop3'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array('1'),
|
||||||
|
'mandatory' => true
|
||||||
|
),
|
||||||
|
'ftps' => array(
|
||||||
|
'label' => $lng['customer']['ftps'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => 0,
|
||||||
|
'maxlength' => 9,
|
||||||
|
'ul_field' => $ftps_ul
|
||||||
|
),
|
||||||
|
'tickets' => array(
|
||||||
|
'label' => $lng['customer']['tickets'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => 0,
|
||||||
|
'maxlength' => 9,
|
||||||
|
'visible' => (Settings::Get('ticket.enabled') == '1' ? true : false),
|
||||||
|
'ul_field' => $tickets_ul
|
||||||
|
),
|
||||||
|
'mysqls' => array(
|
||||||
|
'label' => $lng['customer']['mysqls'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => 0,
|
||||||
|
'maxlength' => 9,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $mysqls_ul
|
||||||
|
),
|
||||||
|
'phpenabled' => array(
|
||||||
|
'label' => $lng['admin']['phpenabled'].'?',
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array('1')
|
||||||
|
),
|
||||||
|
'perlenabled' => array(
|
||||||
|
'label' => $lng['admin']['perlenabled'].'?',
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
287
lib/formfields/admin/customer/formfield.customer_edit.php
Normal file
287
lib/formfields/admin/customer/formfield.customer_edit.php
Normal file
@@ -0,0 +1,287 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file is part of the Froxlor project.
|
||||||
|
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the COPYING
|
||||||
|
* file that was distributed with this source code. You can also view the
|
||||||
|
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
*
|
||||||
|
* @copyright (c) the authors
|
||||||
|
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||||
|
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
* @package Formfields
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'customer_edit' => array(
|
||||||
|
'title' => $lng['admin']['customer_edit'],
|
||||||
|
'image' => 'icons/user_edit.png',
|
||||||
|
'sections' => array(
|
||||||
|
'section_a' => array(
|
||||||
|
'title' => $lng['admin']['accountdata'],
|
||||||
|
'image' => 'icons/user_edit.png',
|
||||||
|
'fields' => array(
|
||||||
|
'loginname' => array(
|
||||||
|
'label' => $lng['login']['username'],
|
||||||
|
'type' => 'label',
|
||||||
|
'value' => $result['loginname']
|
||||||
|
),
|
||||||
|
'documentroot' => array(
|
||||||
|
'label' => $lng['customer']['documentroot'],
|
||||||
|
'type' => 'label',
|
||||||
|
'value' => $result['documentroot']
|
||||||
|
),
|
||||||
|
'createstdsubdomain' => array(
|
||||||
|
'label' => $lng['admin']['stdsubdomain_add'].'?',
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array(($result['standardsubdomain'] != '0') ? '1' : '0')
|
||||||
|
),
|
||||||
|
'deactivated' => array(
|
||||||
|
'label' => $lng['admin']['deactivated_user'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array($result['deactivated'])
|
||||||
|
),
|
||||||
|
'new_customer_password' => array(
|
||||||
|
'label' => $lng['login']['password'].' ('.$lng['panel']['emptyfornochanges'].')',
|
||||||
|
'type' => 'password',
|
||||||
|
'autocomplete' => 'off'
|
||||||
|
),
|
||||||
|
'new_customer_password_suggestion' => array(
|
||||||
|
'label' => $lng['customer']['generated_pwd'],
|
||||||
|
'type' => 'text',
|
||||||
|
'visible' => (Settings::Get('panel.password_regex') == ''),
|
||||||
|
'value' => generatePassword(),
|
||||||
|
),
|
||||||
|
'def_language' => array(
|
||||||
|
'label' => $lng['login']['language'],
|
||||||
|
'type' => 'select',
|
||||||
|
'select_var' => $language_options
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'section_b' => array(
|
||||||
|
'title' => $lng['admin']['contactdata'],
|
||||||
|
'image' => 'icons/user_edit.png',
|
||||||
|
'fields' => array(
|
||||||
|
'name' => array(
|
||||||
|
'label' => $lng['customer']['name'],
|
||||||
|
'type' => 'text',
|
||||||
|
'mandatory_ex' => true,
|
||||||
|
'value' => $result['name']
|
||||||
|
),
|
||||||
|
'firstname' => array(
|
||||||
|
'label' => $lng['customer']['firstname'],
|
||||||
|
'type' => 'text',
|
||||||
|
'mandatory_ex' => true,
|
||||||
|
'value' => $result['firstname']
|
||||||
|
),
|
||||||
|
'gender' => array(
|
||||||
|
'label' => $lng['gender']['title'],
|
||||||
|
'type' => 'select',
|
||||||
|
'select_var' => $gender_options
|
||||||
|
),
|
||||||
|
'company' => array(
|
||||||
|
'label' => $lng['customer']['company'],
|
||||||
|
'type' => 'text',
|
||||||
|
'mandatory_ex' => true,
|
||||||
|
'value' => $result['company']
|
||||||
|
),
|
||||||
|
'street' => array(
|
||||||
|
'label' => $lng['customer']['street'],
|
||||||
|
'type' => 'text',
|
||||||
|
'value' => $result['street']
|
||||||
|
),
|
||||||
|
'zipcode' => array(
|
||||||
|
'label' => $lng['customer']['zipcode'],
|
||||||
|
'type' => 'text',
|
||||||
|
'value' => $result['zipcode']
|
||||||
|
),
|
||||||
|
'city' => array(
|
||||||
|
'label' => $lng['customer']['city'],
|
||||||
|
'type' => 'text',
|
||||||
|
'value' => $result['city']
|
||||||
|
),
|
||||||
|
'phone' => array(
|
||||||
|
'label' => $lng['customer']['phone'],
|
||||||
|
'type' => 'text',
|
||||||
|
'value' => $result['phone']
|
||||||
|
),
|
||||||
|
'fax' => array(
|
||||||
|
'label' => $lng['customer']['fax'],
|
||||||
|
'type' => 'text',
|
||||||
|
'value' => $result['fax']
|
||||||
|
),
|
||||||
|
'email' => array(
|
||||||
|
'label' => $lng['customer']['email'],
|
||||||
|
'type' => 'text',
|
||||||
|
'mandatory' => true,
|
||||||
|
'value' => $result['email']
|
||||||
|
),
|
||||||
|
'customernumber' => array(
|
||||||
|
'label' => $lng['customer']['customernumber'],
|
||||||
|
'type' => 'text',
|
||||||
|
'value' => $result['customernumber']
|
||||||
|
),
|
||||||
|
'custom_notes' => array(
|
||||||
|
'style' => 'align-top',
|
||||||
|
'label' => $lng['usersettings']['custom_notes']['title'],
|
||||||
|
'desc' => $lng['usersettings']['custom_notes']['description'],
|
||||||
|
'type' => 'textarea',
|
||||||
|
'cols' => 60,
|
||||||
|
'rows' => 12,
|
||||||
|
'value' => $result['custom_notes']
|
||||||
|
),
|
||||||
|
'custom_notes_show' => array(
|
||||||
|
'label' => $lng['usersettings']['custom_notes']['show'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array($result['custom_notes_show'])
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'section_c' => array(
|
||||||
|
'title' => $lng['admin']['servicedata'],
|
||||||
|
'image' => 'icons/user_edit.png',
|
||||||
|
'fields' => array(
|
||||||
|
'diskspace' => array(
|
||||||
|
'label' => $lng['customer']['diskspace'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => $result['diskspace'],
|
||||||
|
'maxlength' => 6,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $diskspace_ul
|
||||||
|
),
|
||||||
|
'traffic' => array(
|
||||||
|
'label' => $lng['customer']['traffic'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => $result['traffic'],
|
||||||
|
'maxlength' => 4,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $traffic_ul
|
||||||
|
),
|
||||||
|
'subdomains' => array(
|
||||||
|
'label' => $lng['customer']['subdomains'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => $result['subdomains'],
|
||||||
|
'maxlength' => 9,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $subdomains_ul
|
||||||
|
),
|
||||||
|
'emails' => array(
|
||||||
|
'label' => $lng['customer']['emails'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => $result['emails'],
|
||||||
|
'maxlength' => 9,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $emails_ul
|
||||||
|
),
|
||||||
|
'email_accounts' => array(
|
||||||
|
'label' => $lng['customer']['accounts'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => $result['email_accounts'],
|
||||||
|
'maxlength' => 9,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $email_accounts_ul
|
||||||
|
),
|
||||||
|
'email_forwarders' => array(
|
||||||
|
'label' => $lng['customer']['forwarders'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => $result['email_forwarders'],
|
||||||
|
'maxlength' => 9,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $email_forwarders_ul
|
||||||
|
),
|
||||||
|
'email_quota' => array(
|
||||||
|
'label' => $lng['customer']['email_quota'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => $result['email_quota'],
|
||||||
|
'maxlength' => 9,
|
||||||
|
'visible' => (Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $email_quota_ul
|
||||||
|
),
|
||||||
|
'email_imap' => array(
|
||||||
|
'label' => $lng['customer']['email_imap'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array($result['imap']),
|
||||||
|
'mandatory' => true
|
||||||
|
),
|
||||||
|
'email_pop3' => array(
|
||||||
|
'label' => $lng['customer']['email_pop3'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array($result['pop3']),
|
||||||
|
'mandatory' => true
|
||||||
|
),
|
||||||
|
'ftps' => array(
|
||||||
|
'label' => $lng['customer']['ftps'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => $result['ftps'],
|
||||||
|
'maxlength' => 9,
|
||||||
|
'ul_field' => $ftps_ul
|
||||||
|
),
|
||||||
|
'tickets' => array(
|
||||||
|
'label' => $lng['customer']['tickets'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => $result['tickets'],
|
||||||
|
'maxlength' => 9,
|
||||||
|
'visible' => (Settings::Get('ticket.enabled') == '1' ? true : false),
|
||||||
|
'ul_field' => $tickets_ul
|
||||||
|
),
|
||||||
|
'mysqls' => array(
|
||||||
|
'label' => $lng['customer']['mysqls'],
|
||||||
|
'type' => 'textul',
|
||||||
|
'value' => $result['mysqls'],
|
||||||
|
'maxlength' => 9,
|
||||||
|
'mandatory' => true,
|
||||||
|
'ul_field' => $mysqls_ul
|
||||||
|
),
|
||||||
|
'phpenabled' => array(
|
||||||
|
'label' => $lng['admin']['phpenabled'].'?',
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array($result['phpenabled'])
|
||||||
|
),
|
||||||
|
'perlenabled' => array(
|
||||||
|
'label' => $lng['admin']['perlenabled'].'?',
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array($result['perlenabled'])
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'section_d' => array(
|
||||||
|
'title' => $lng['admin']['movetoadmin'],
|
||||||
|
'image' => 'icons/user_edit.png',
|
||||||
|
'visible' => ($admin_select_cnt > 1),
|
||||||
|
'fields' => array(
|
||||||
|
'move_to_admin' => array(
|
||||||
|
'label' => $lng['admin']['movecustomertoadmin'],
|
||||||
|
'type' => 'select',
|
||||||
|
'select_var' => $admin_select
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
@@ -1,236 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This file is part of the Froxlor project.
|
|
||||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the COPYING
|
|
||||||
* file that was distributed with this source code. You can also view the
|
|
||||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
*
|
|
||||||
* @copyright (c) the authors
|
|
||||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
|
||||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
* @package Formfields
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
return array(
|
|
||||||
'accountdata' => array(
|
|
||||||
'title' => $lng['admin']['accountdata'],
|
|
||||||
'fields' => array(
|
|
||||||
'loginname' => array(
|
|
||||||
'label' => $lng['login']['username'],
|
|
||||||
'type' => (isset($result['loginname'])) ? 'static' : 'text',
|
|
||||||
'mandatory' => true,
|
|
||||||
),
|
|
||||||
'deactivated' => array(
|
|
||||||
'label' => $lng['admin']['deactivated_user'],
|
|
||||||
'type' => 'checkbox',
|
|
||||||
'value' => '1',
|
|
||||||
'sublabel' => $lng['panel']['yes'],
|
|
||||||
'visible' => (!isset($result['adminid']) || (isset($result['adminid']) && $result['adminid'] != $userinfo['userid'])),
|
|
||||||
),
|
|
||||||
'admin_password' => array(
|
|
||||||
'label' => $lng['login']['password'],
|
|
||||||
'type' => 'password',
|
|
||||||
'mandatory' => true,
|
|
||||||
'autocomplete' => 'off'
|
|
||||||
),
|
|
||||||
'admin_password_suggestion' => array(
|
|
||||||
'label' => $lng['customer']['generated_pwd'],
|
|
||||||
'type' => 'text',
|
|
||||||
'visible' => (Settings::Get('panel.password_regex') == ''),
|
|
||||||
'value' => generatePassword(),
|
|
||||||
'attributes' => array(
|
|
||||||
'readonly' => true
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'def_language' => array(
|
|
||||||
'label' => $lng['login']['language'],
|
|
||||||
'type' => 'select',
|
|
||||||
'generate' => 'languages',
|
|
||||||
'selected' => Settings::Get('panel.standardlanguage')
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'contactdata' => array(
|
|
||||||
'title' => $lng['admin']['contactdata'],
|
|
||||||
'fields' => array(
|
|
||||||
'name' => array(
|
|
||||||
'label' => $lng['customer']['name'],
|
|
||||||
'type' => 'text',
|
|
||||||
'mandatory' => true
|
|
||||||
),
|
|
||||||
'email' => array(
|
|
||||||
'label' => $lng['customer']['email'],
|
|
||||||
'type' => 'email',
|
|
||||||
'mandatory' => true
|
|
||||||
),
|
|
||||||
'custom_notes' => array(
|
|
||||||
'label' => $lng['usersettings']['custom_notes']['title'],
|
|
||||||
'desc' => $lng['usersettings']['custom_notes']['description'],
|
|
||||||
'type' => 'textarea',
|
|
||||||
'attributes' => array(
|
|
||||||
'cols' => 60,
|
|
||||||
'rows' => 12
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'custom_notes_show' => array(
|
|
||||||
'label' => $lng['usersettings']['custom_notes']['show'],
|
|
||||||
'type' => 'checkbox',
|
|
||||||
'sublabel' => $lng['panel']['yes'],
|
|
||||||
'value' => '1'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'servicedata' => array(
|
|
||||||
'title' => $lng['admin']['servicedata'],
|
|
||||||
'visible' => (!isset($result['adminid']) || (isset($result['adminid']) && $result['adminid'] != $userinfo['userid'])),
|
|
||||||
'fields' => array(
|
|
||||||
'ipaddress' => array(
|
|
||||||
'label' => $lng['serversettings']['ipaddress']['title'],
|
|
||||||
'type' => 'select',
|
|
||||||
'values' => $ipaddress
|
|
||||||
),
|
|
||||||
'change_serversettings' => array(
|
|
||||||
'label' => $lng['admin']['change_serversettings'],
|
|
||||||
'type' => 'checkbox',
|
|
||||||
'sublabel' => $lng['panel']['yes'],
|
|
||||||
'value' => 1
|
|
||||||
),
|
|
||||||
'customers' => array(
|
|
||||||
'label' => $lng['admin']['customers'],
|
|
||||||
'type' => 'textul',
|
|
||||||
'value' => 0,
|
|
||||||
'mandatory' => true,
|
|
||||||
'attributes' => array(
|
|
||||||
'maxlength' => 9
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'customers_see_all' => array(
|
|
||||||
'label' => $lng['admin']['customers_see_all'],
|
|
||||||
'type' => 'checkbox',
|
|
||||||
'sublabel' => $lng['panel']['yes'],
|
|
||||||
'value' => '1'
|
|
||||||
),
|
|
||||||
'domains' => array(
|
|
||||||
'label' => $lng['admin']['domains'],
|
|
||||||
'type' => 'textul',
|
|
||||||
'value' => 0,
|
|
||||||
'mandatory' => true,
|
|
||||||
'attributes' => array(
|
|
||||||
'maxlength' => 9
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'domains_see_all' => array(
|
|
||||||
'label' => $lng['admin']['domains_see_all'],
|
|
||||||
'type' => 'checkbox',
|
|
||||||
'sublabel' => $lng['panel']['yes'],
|
|
||||||
'value' => '1'
|
|
||||||
),
|
|
||||||
'caneditphpsettings' => array(
|
|
||||||
'label' => $lng['admin']['caneditphpsettings'],
|
|
||||||
'type' => 'checkbox',
|
|
||||||
'sublabel' => $lng['panel']['yes'],
|
|
||||||
'value' => '1'
|
|
||||||
),
|
|
||||||
'diskspace' => array(
|
|
||||||
'label' => $lng['customer']['diskspace'],
|
|
||||||
'type' => 'textul',
|
|
||||||
'value' => 0,
|
|
||||||
'mandatory' => true,
|
|
||||||
'attributes' => array(
|
|
||||||
'maxlength' => 6
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'traffic' => array(
|
|
||||||
'label' => $lng['customer']['traffic'],
|
|
||||||
'type' => 'textul',
|
|
||||||
'value' => 0,
|
|
||||||
'mandatory' => true,
|
|
||||||
'attributes' => array(
|
|
||||||
'maxlength' => 4
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'subdomains' => array(
|
|
||||||
'label' => $lng['customer']['subdomains'],
|
|
||||||
'type' => 'textul',
|
|
||||||
'value' => 0,
|
|
||||||
'mandatory' => true,
|
|
||||||
'attributes' => array(
|
|
||||||
'maxlength' => 9
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'emails' => array(
|
|
||||||
'label' => $lng['customer']['emails'],
|
|
||||||
'type' => 'textul',
|
|
||||||
'value' => 0,
|
|
||||||
'mandatory' => true,
|
|
||||||
'attributes' => array(
|
|
||||||
'maxlength' => 9
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'email_accounts' => array(
|
|
||||||
'label' => $lng['customer']['accounts'],
|
|
||||||
'type' => 'textul',
|
|
||||||
'value' => 0,
|
|
||||||
'mandatory' => true,
|
|
||||||
'attributes' => array(
|
|
||||||
'maxlength' => 9
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'email_forwarders' => array(
|
|
||||||
'label' => $lng['customer']['forwarders'],
|
|
||||||
'type' => 'textul',
|
|
||||||
'value' => 0,
|
|
||||||
'mandatory' => true,
|
|
||||||
'attributes' => array(
|
|
||||||
'maxlength' => 9
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'email_quota' => array(
|
|
||||||
'label' => $lng['customer']['email_quota'],
|
|
||||||
'type' => 'textul',
|
|
||||||
'value' => 0,
|
|
||||||
'visible' => (Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
|
|
||||||
'mandatory' => true,
|
|
||||||
'attributes' => array(
|
|
||||||
'maxlength' => 9
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'ftps' => array(
|
|
||||||
'label' => $lng['customer']['ftps'],
|
|
||||||
'type' => 'textul',
|
|
||||||
'value' => 0,
|
|
||||||
'attributes' => array(
|
|
||||||
'maxlength' => 9
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'tickets' => array(
|
|
||||||
'label' => $lng['customer']['tickets'],
|
|
||||||
'type' => 'textul',
|
|
||||||
'value' => 0,
|
|
||||||
'visible' => (Settings::Get('ticket.enabled') == '1' ? true : false),
|
|
||||||
'attributes' => array(
|
|
||||||
'maxlength' => 9
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'tickets_see_all' => array(
|
|
||||||
'label' => $lng['admin']['tickets_see_all'],
|
|
||||||
'type' => 'checkbox',
|
|
||||||
'sublabel' => $lng['panel']['yes'],
|
|
||||||
'value' => '1'
|
|
||||||
),
|
|
||||||
'mysqls' => array(
|
|
||||||
'label' => $lng['customer']['mysqls'],
|
|
||||||
'type' => 'textul',
|
|
||||||
'value' => 0,
|
|
||||||
'mandatory' => true,
|
|
||||||
'attributes' => array(
|
|
||||||
'maxlength' => 9
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This file is part of the Froxlor project.
|
|
||||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the COPYING
|
|
||||||
* file that was distributed with this source code. You can also view the
|
|
||||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
*
|
|
||||||
* @copyright (c) the authors
|
|
||||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
|
||||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
* @package Formfields
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
return array(
|
|
||||||
'section_a' => array(
|
|
||||||
'fields' => array(
|
|
||||||
'cronfile' => array(
|
|
||||||
'label' => 'Cronjob',
|
|
||||||
'type' => ($change_cronfile == 1 ? 'text' : 'static'),
|
|
||||||
),
|
|
||||||
'isactive' => array(
|
|
||||||
'label' => $lng['admin']['activated'],
|
|
||||||
'type' => 'checkbox',
|
|
||||||
'sublabel' => $lng['panel']['yes'],
|
|
||||||
'value' => 1,
|
|
||||||
),
|
|
||||||
'interval_value' => array(
|
|
||||||
'label' => $lng['cronjob']['cronjobintervalv'],
|
|
||||||
'type' => 'text'
|
|
||||||
),
|
|
||||||
'interval_interval' => array(
|
|
||||||
'label' => $lng['cronjob']['cronjobinterval'],
|
|
||||||
'type' => 'select',
|
|
||||||
'values' => $interval_interval
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
@@ -1,305 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This file is part of the Froxlor project.
|
|
||||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the COPYING
|
|
||||||
* file that was distributed with this source code. You can also view the
|
|
||||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
*
|
|
||||||
* @copyright (c) the authors
|
|
||||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
|
||||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
* @package Formfields
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
return array(
|
|
||||||
'accountdata' => array(
|
|
||||||
'title' => $lng['admin']['accountdata'],
|
|
||||||
'fields' => array(
|
|
||||||
'new_loginname' => array(
|
|
||||||
'label' => $lng['login']['username'],
|
|
||||||
'type' => 'text',
|
|
||||||
'visible' => 'new'
|
|
||||||
),
|
|
||||||
'loginname' => array(
|
|
||||||
'label' => $lng['login']['username'],
|
|
||||||
'type' => 'static',
|
|
||||||
'visible' => 'edit'
|
|
||||||
),
|
|
||||||
'documentroot' => array(
|
|
||||||
'label' => $lng['customer']['documentroot'],
|
|
||||||
'type' => 'static',
|
|
||||||
'visible' => 'edit'
|
|
||||||
),
|
|
||||||
'createstdsubdomain' => array(
|
|
||||||
'label' => $lng['admin']['stdsubdomain_add'].'?',
|
|
||||||
'type' => 'checkbox',
|
|
||||||
'sublabel' => $lng['panel']['yes'],
|
|
||||||
'value' => '1',
|
|
||||||
'attributes' => array(
|
|
||||||
'checked' => true
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'store_defaultindex' => array(
|
|
||||||
'label' => $lng['admin']['store_defaultindex'].'?',
|
|
||||||
'type' => 'checkbox',
|
|
||||||
'sublabel' => $lng['panel']['yes'],
|
|
||||||
'value' => '1',
|
|
||||||
'visible' => 'new',
|
|
||||||
'attributes' => array(
|
|
||||||
'checked' => true
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'deactivated' => array(
|
|
||||||
'label' => $lng['admin']['deactivated_user'],
|
|
||||||
'type' => 'checkbox',
|
|
||||||
'sublabel' => $lng['panel']['yes'],
|
|
||||||
'value' => '1',
|
|
||||||
'visible' => 'edit'
|
|
||||||
),
|
|
||||||
'new_customer_password' => array(
|
|
||||||
'label' => $lng['login']['password'],
|
|
||||||
'type' => 'password',
|
|
||||||
'attributes' => array(
|
|
||||||
'autocomplete' => 'off'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'new_customer_password_suggestion' => array(
|
|
||||||
'label' => $lng['customer']['generated_pwd'],
|
|
||||||
'type' => 'text',
|
|
||||||
'visible' => (Settings::Get('panel.password_regex') == ''),
|
|
||||||
'value' => generatePassword(),
|
|
||||||
'attributes' => array(
|
|
||||||
'readonly' => true
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'sendpassword' => array(
|
|
||||||
'label' => $lng['admin']['sendpassword'],
|
|
||||||
'type' => 'checkbox',
|
|
||||||
'sublabel' => $lng['panel']['yes'],
|
|
||||||
'visible' => 'new',
|
|
||||||
'attributes' => array(
|
|
||||||
'checked' => true
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'def_language' => array(
|
|
||||||
'label' => $lng['login']['language'],
|
|
||||||
'type' => 'select',
|
|
||||||
'generate' => 'languages',
|
|
||||||
'selected' => Settings::Get('panel.standardlanguage'),
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'contactdata' => array(
|
|
||||||
'title' => $lng['admin']['contactdata'],
|
|
||||||
'fields' => array(
|
|
||||||
'gender' => array(
|
|
||||||
'label' => $lng['gender']['title'],
|
|
||||||
'type' => 'select',
|
|
||||||
'generate' => 'genders',
|
|
||||||
'selected' => '0'
|
|
||||||
),
|
|
||||||
'name' => array(
|
|
||||||
'label' => $lng['customer']['name'],
|
|
||||||
'type' => 'text',
|
|
||||||
'mandatory_ex' => true
|
|
||||||
),
|
|
||||||
'firstname' => array(
|
|
||||||
'label' => $lng['customer']['firstname'],
|
|
||||||
'type' => 'text',
|
|
||||||
'mandatory_ex' => true
|
|
||||||
),
|
|
||||||
'company' => array(
|
|
||||||
'label' => $lng['customer']['company'],
|
|
||||||
'type' => 'text',
|
|
||||||
'mandatory_ex' => true
|
|
||||||
),
|
|
||||||
'street' => array(
|
|
||||||
'label' => $lng['customer']['street'],
|
|
||||||
'type' => 'text'
|
|
||||||
),
|
|
||||||
'zipcode' => array(
|
|
||||||
'label' => $lng['customer']['zipcode'],
|
|
||||||
'type' => 'text'
|
|
||||||
),
|
|
||||||
'city' => array(
|
|
||||||
'label' => $lng['customer']['city'],
|
|
||||||
'type' => 'text'
|
|
||||||
),
|
|
||||||
'phone' => array(
|
|
||||||
'label' => $lng['customer']['phone'],
|
|
||||||
'type' => 'text'
|
|
||||||
),
|
|
||||||
'fax' => array(
|
|
||||||
'label' => $lng['customer']['fax'],
|
|
||||||
'type' => 'text'
|
|
||||||
),
|
|
||||||
'email' => array(
|
|
||||||
'label' => $lng['customer']['email'],
|
|
||||||
'type' => 'email',
|
|
||||||
'mandatory' => true
|
|
||||||
),
|
|
||||||
'customernumber' => array(
|
|
||||||
'label' => $lng['customer']['customernumber'],
|
|
||||||
'type' => 'text'
|
|
||||||
),
|
|
||||||
'custom_notes' => array(
|
|
||||||
'label' => $lng['usersettings']['custom_notes']['title'],
|
|
||||||
'desc' => $lng['usersettings']['custom_notes']['description'],
|
|
||||||
'type' => 'textarea',
|
|
||||||
'attributes' => array(
|
|
||||||
'cols' => 60,
|
|
||||||
'rows' => 12
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'custom_notes_show' => array(
|
|
||||||
'label' => $lng['usersettings']['custom_notes']['show'],
|
|
||||||
'type' => 'checkbox',
|
|
||||||
'sublabel' => $lng['panel']['yes'],
|
|
||||||
'value' => '1'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'servicedata' => array(
|
|
||||||
'title' => $lng['admin']['servicedata'],
|
|
||||||
'fields' => array(
|
|
||||||
'diskspace' => array(
|
|
||||||
'label' => $lng['customer']['diskspace'],
|
|
||||||
'type' => 'textul',
|
|
||||||
'value' => 0,
|
|
||||||
'mandatory' => true,
|
|
||||||
'attributes' => array(
|
|
||||||
'maxlength' => 6,
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'traffic' => array(
|
|
||||||
'label' => $lng['customer']['traffic'],
|
|
||||||
'type' => 'textul',
|
|
||||||
'value' => 0,
|
|
||||||
'mandatory' => true,
|
|
||||||
'attributes' => array(
|
|
||||||
'maxlength' => 4,
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'subdomains' => array(
|
|
||||||
'label' => $lng['customer']['subdomains'],
|
|
||||||
'type' => 'textul',
|
|
||||||
'value' => 0,
|
|
||||||
'mandatory' => true,
|
|
||||||
'attributes' => array(
|
|
||||||
'maxlength' => 9,
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'emails' => array(
|
|
||||||
'label' => $lng['customer']['emails'],
|
|
||||||
'type' => 'textul',
|
|
||||||
'value' => 0,
|
|
||||||
'mandatory' => true,
|
|
||||||
'attributes' => array(
|
|
||||||
'maxlength' => 9,
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'email_accounts' => array(
|
|
||||||
'label' => $lng['customer']['accounts'],
|
|
||||||
'type' => 'textul',
|
|
||||||
'value' => 0,
|
|
||||||
'mandatory' => true,
|
|
||||||
'attributes' => array(
|
|
||||||
'maxlength' => 9,
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'email_forwarders' => array(
|
|
||||||
'label' => $lng['customer']['forwarders'],
|
|
||||||
'type' => 'textul',
|
|
||||||
'value' => 0,
|
|
||||||
'mandatory' => true,
|
|
||||||
'attributes' => array(
|
|
||||||
'maxlength' => 9,
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'email_quota' => array(
|
|
||||||
'label' => $lng['customer']['email_quota'],
|
|
||||||
'type' => 'textul',
|
|
||||||
'value' => 0,
|
|
||||||
'visible' => (Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
|
|
||||||
'mandatory' => true,
|
|
||||||
'attributes' => array(
|
|
||||||
'maxlength' => 9,
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'email_imap' => array(
|
|
||||||
'label' => $lng['customer']['email_imap'],
|
|
||||||
'type' => 'checkbox',
|
|
||||||
'sublabel' => $lng['panel']['yes'],
|
|
||||||
'value' => '1',
|
|
||||||
'attributes' => array(
|
|
||||||
'checked' => true
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'email_pop3' => array(
|
|
||||||
'label' => $lng['customer']['email_pop3'],
|
|
||||||
'type' => 'checkbox',
|
|
||||||
'sublabel' => $lng['panel']['yes'],
|
|
||||||
'value' => '1',
|
|
||||||
'attributes' => array(
|
|
||||||
'checked' => true
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'ftps' => array(
|
|
||||||
'label' => $lng['customer']['ftps'],
|
|
||||||
'type' => 'textul',
|
|
||||||
'value' => 0,
|
|
||||||
'attributes' => array(
|
|
||||||
'maxlength' => 9,
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'tickets' => array(
|
|
||||||
'label' => $lng['customer']['tickets'],
|
|
||||||
'type' => 'textul',
|
|
||||||
'value' => 0,
|
|
||||||
'visible' => (Settings::Get('ticket.enabled') == '1' ? true : false),
|
|
||||||
'attributes' => array(
|
|
||||||
'maxlength' => 9,
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'mysqls' => array(
|
|
||||||
'label' => $lng['customer']['mysqls'],
|
|
||||||
'type' => 'textul',
|
|
||||||
'value' => 0,
|
|
||||||
'mandatory' => true,
|
|
||||||
'attributes' => array(
|
|
||||||
'maxlength' => 9,
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'phpenabled' => array(
|
|
||||||
'label' => $lng['admin']['phpenabled'].'?',
|
|
||||||
'type' => 'checkbox',
|
|
||||||
'sublabel' => $lng['panel']['yes'],
|
|
||||||
'value' => '1',
|
|
||||||
'attributes' => array(
|
|
||||||
'checked' => true
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'perlenabled' => array(
|
|
||||||
'label' => $lng['admin']['perlenabled'].'?',
|
|
||||||
'type' => 'checkbox',
|
|
||||||
'sublabel' => $lng['panel']['yes'],
|
|
||||||
'value' => '1',
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'movetoadmin' => array(
|
|
||||||
'title' => $lng['admin']['movetoadmin'],
|
|
||||||
'visible' => (isset($admin_select_cnt) && $admin_select_cnt > 1 && isset($result['loginname'])),
|
|
||||||
'fields' => array(
|
|
||||||
'move_to_admin' => array(
|
|
||||||
'label' => $lng['admin']['movecustomertoadmin'],
|
|
||||||
'type' => 'select',
|
|
||||||
'values' => (isset($admin_select)) ? $admin_select : null
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
@@ -1,126 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This file is part of the Froxlor project.
|
|
||||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the COPYING
|
|
||||||
* file that was distributed with this source code. You can also view the
|
|
||||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
*
|
|
||||||
* @copyright (c) the authors
|
|
||||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
|
||||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
* @package Formfields
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
return array(
|
|
||||||
'section_a' => array(
|
|
||||||
'title' => $lng['admin']['ipsandports']['ipandport'],
|
|
||||||
'fields' => array(
|
|
||||||
'ip' => array(
|
|
||||||
'label' => $lng['admin']['ipsandports']['ip'],
|
|
||||||
'type' => 'text'
|
|
||||||
),
|
|
||||||
'port' => array(
|
|
||||||
'label' => $lng['admin']['ipsandports']['port'],
|
|
||||||
'type' => 'text',
|
|
||||||
'size' => 5
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'section_b' => array(
|
|
||||||
'title' => $lng['admin']['ipsandports']['webserverdefaultconfig'],
|
|
||||||
'fields' => array(
|
|
||||||
'listen_statement' => array(
|
|
||||||
'label' => $lng['admin']['ipsandports']['create_listen_statement'],
|
|
||||||
'type' => 'checkbox',
|
|
||||||
'value' => '1',
|
|
||||||
'attributes' => array(
|
|
||||||
'checked' => true
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'namevirtualhost_statement' => array(
|
|
||||||
'label' => $lng['admin']['ipsandports']['create_namevirtualhost_statement'],
|
|
||||||
'type' => 'checkbox',
|
|
||||||
'value' => '1',
|
|
||||||
'attributes' => array(
|
|
||||||
'checked' => true
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'vhostcontainer' => array(
|
|
||||||
'label' => $lng['admin']['ipsandports']['create_vhostcontainer'],
|
|
||||||
'type' => 'checkbox',
|
|
||||||
'value' => '1',
|
|
||||||
'attributes' => array(
|
|
||||||
'checked' => true
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'docroot' => array(
|
|
||||||
'label' => $lng['admin']['ipsandports']['docroot']['title'],
|
|
||||||
'desc' => $lng['admin']['ipsandports']['docroot']['description'],
|
|
||||||
'type' => 'text'
|
|
||||||
),
|
|
||||||
'specialsettings' => array(
|
|
||||||
'label' => $lng['admin']['ownvhostsettings'],
|
|
||||||
'desc' => $lng['serversettings']['default_vhostconf']['description'],
|
|
||||||
'type' => 'textarea',
|
|
||||||
'attributes' => array(
|
|
||||||
'cols' => 60,
|
|
||||||
'rows' => 12
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'vhostcontainer_servername_statement' => array(
|
|
||||||
'label' => $lng['admin']['ipsandports']['create_vhostcontainer_servername_statement'],
|
|
||||||
'type' => 'checkbox',
|
|
||||||
'value' => '1',
|
|
||||||
'attributes' => array(
|
|
||||||
'checked' => true
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'section_c' => array(
|
|
||||||
'title' => $lng['admin']['ipsandports']['webserverdomainconfig'],
|
|
||||||
'fields' => array(
|
|
||||||
'default_vhostconf_domain' => array(
|
|
||||||
'label' => $lng['admin']['ipsandports']['default_vhostconf_domain'],
|
|
||||||
'desc' => $lng['serversettings']['default_vhostconf_domain']['description'],
|
|
||||||
'type' => 'textarea',
|
|
||||||
'attributes' => array(
|
|
||||||
'cols' => 60,
|
|
||||||
'rows' => 12
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'section_d' => array(
|
|
||||||
'title' => $lng['admin']['ipsandports']['webserverssldomainconfig'],
|
|
||||||
'visible' => (Settings::Get('system.use_ssl') == 1 ? true : false),
|
|
||||||
'fields' => array(
|
|
||||||
'ssl' => array(
|
|
||||||
'label' => $lng['admin']['ipsandports']['enable_ssl'],
|
|
||||||
'type' => 'checkbox',
|
|
||||||
'value' => '1'
|
|
||||||
),
|
|
||||||
'ssl_cert_file' => array(
|
|
||||||
'label' => $lng['admin']['ipsandports']['ssl_cert_file'],
|
|
||||||
'type' => 'text'
|
|
||||||
),
|
|
||||||
'ssl_key_file' => array(
|
|
||||||
'label' => $lng['admin']['ipsandports']['ssl_key_file'],
|
|
||||||
'type' => 'text'
|
|
||||||
),
|
|
||||||
'ssl_ca_file' => array(
|
|
||||||
'label' => $lng['admin']['ipsandports']['ssl_ca_file'],
|
|
||||||
'type' => 'text'
|
|
||||||
),
|
|
||||||
'ssl_cert_chainfile' => array(
|
|
||||||
'label' => $lng['admin']['ipsandports']['ssl_cert_chainfile']['title'],
|
|
||||||
'desc' => $lng['admin']['ipsandports']['ssl_cert_chainfile']['description'],
|
|
||||||
'type' => 'text'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
@@ -1,101 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This file is part of the Froxlor project.
|
|
||||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the COPYING
|
|
||||||
* file that was distributed with this source code. You can also view the
|
|
||||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
*
|
|
||||||
* @copyright (c) the authors
|
|
||||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
|
||||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
* @package Formfields
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
return array(
|
|
||||||
'section_a' => array(
|
|
||||||
'title' => $lng['admin']['phpsettings']['addsettings'],
|
|
||||||
'fields' => array(
|
|
||||||
'description' => array(
|
|
||||||
'label' => $lng['admin']['phpsettings']['description'],
|
|
||||||
'type' => 'text',
|
|
||||||
'attributes' => array(
|
|
||||||
'maxlength' => 50
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'binary' => array(
|
|
||||||
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
|
||||||
'label' => $lng['admin']['phpsettings']['binary'],
|
|
||||||
'type' => 'text',
|
|
||||||
'value' => '/usr/bin/php-cgi',
|
|
||||||
'attributes' => array(
|
|
||||||
'maxlength' => 255
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'file_extensions' => array(
|
|
||||||
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
|
||||||
'label' => $lng['admin']['phpsettings']['file_extensions'],
|
|
||||||
'desc' => $lng['admin']['phpsettings']['file_extensions_note'],
|
|
||||||
'type' => 'text',
|
|
||||||
'value' => 'php',
|
|
||||||
'attributes' => array(
|
|
||||||
'maxlength' => 255
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'mod_fcgid_starter' => array(
|
|
||||||
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
|
||||||
'label' => $lng['admin']['mod_fcgid_starter']['title'],
|
|
||||||
'type' => 'text'
|
|
||||||
),
|
|
||||||
'mod_fcgid_maxrequests' => array(
|
|
||||||
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
|
||||||
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
|
|
||||||
'type' => 'text'
|
|
||||||
),
|
|
||||||
'mod_fcgid_umask' => array(
|
|
||||||
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
|
||||||
'label' => $lng['admin']['mod_fcgid_umask']['title'],
|
|
||||||
'type' => 'text',
|
|
||||||
'value' => '022',
|
|
||||||
'attributes' => array(
|
|
||||||
'maxlength' => 3
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'fpm_slowlog' => array(
|
|
||||||
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
|
||||||
'label' => $lng['admin']['phpsettings']['enable_slowlog'],
|
|
||||||
'type' => 'checkbox',
|
|
||||||
'value' => '1'
|
|
||||||
),
|
|
||||||
'fpm_reqterm' => array(
|
|
||||||
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
|
||||||
'label' => $lng['admin']['phpsettings']['request_terminate_timeout'],
|
|
||||||
'type' => 'text',
|
|
||||||
'value' => '60s',
|
|
||||||
'attributes' => array(
|
|
||||||
'maxlength' => 10
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'fpm_reqslow' => array(
|
|
||||||
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
|
||||||
'label' => $lng['admin']['phpsettings']['request_slowlog_timeout'],
|
|
||||||
'type' => 'text',
|
|
||||||
'maxlength' => 10,
|
|
||||||
'value' => '5s'
|
|
||||||
),
|
|
||||||
'phpsettings' => array(
|
|
||||||
'style' => 'align-top',
|
|
||||||
'label' => $lng['admin']['phpsettings']['phpinisettings'],
|
|
||||||
'type' => 'textarea',
|
|
||||||
'value' => $result['phpsettings'],
|
|
||||||
'attributes' => array(
|
|
||||||
'cols' => 80,
|
|
||||||
'rows' => 20
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
137
lib/formfields/admin/ipsandports/formfield.ipsandports_add.php
Normal file
137
lib/formfields/admin/ipsandports/formfield.ipsandports_add.php
Normal file
@@ -0,0 +1,137 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file is part of the Froxlor project.
|
||||||
|
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the COPYING
|
||||||
|
* file that was distributed with this source code. You can also view the
|
||||||
|
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
*
|
||||||
|
* @copyright (c) the authors
|
||||||
|
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||||
|
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
* @package Formfields
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'ipsandports_add' => array(
|
||||||
|
'title' => $lng['admin']['ipsandports']['add'],
|
||||||
|
'image' => 'icons/ipsports_add.png',
|
||||||
|
'sections' => array(
|
||||||
|
'section_a' => array(
|
||||||
|
'title' => $lng['admin']['ipsandports']['ipandport'],
|
||||||
|
'image' => 'icons/ipsports_add.png',
|
||||||
|
'fields' => array(
|
||||||
|
'ip' => array(
|
||||||
|
'label' => $lng['admin']['ipsandports']['ip'],
|
||||||
|
'type' => 'text'
|
||||||
|
),
|
||||||
|
'port' => array(
|
||||||
|
'label' => $lng['admin']['ipsandports']['port'],
|
||||||
|
'type' => 'text',
|
||||||
|
'size' => 5
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'section_b' => array(
|
||||||
|
'title' => $lng['admin']['ipsandports']['webserverdefaultconfig'],
|
||||||
|
'image' => 'icons/ipsports_add.png',
|
||||||
|
'fields' => array(
|
||||||
|
'listen_statement' => array(
|
||||||
|
'label' => $lng['admin']['ipsandports']['create_listen_statement'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array('1')
|
||||||
|
),
|
||||||
|
'namevirtualhost_statement' => array(
|
||||||
|
'label' => $lng['admin']['ipsandports']['create_namevirtualhost_statement'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array('1')
|
||||||
|
),
|
||||||
|
'vhostcontainer' => array(
|
||||||
|
'label' => $lng['admin']['ipsandports']['create_vhostcontainer'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array('1')
|
||||||
|
),
|
||||||
|
'docroot' => array(
|
||||||
|
'label' => $lng['admin']['ipsandports']['docroot']['title'],
|
||||||
|
'desc' => $lng['admin']['ipsandports']['docroot']['description'],
|
||||||
|
'type' => 'text'
|
||||||
|
),
|
||||||
|
'specialsettings' => array(
|
||||||
|
'style' => 'align-top',
|
||||||
|
'label' => $lng['admin']['ownvhostsettings'],
|
||||||
|
'desc' => $lng['serversettings']['default_vhostconf']['description'],
|
||||||
|
'type' => 'textarea',
|
||||||
|
'cols' => 60,
|
||||||
|
'rows' => 12
|
||||||
|
),
|
||||||
|
'vhostcontainer_servername_statement' => array(
|
||||||
|
'label' => $lng['admin']['ipsandports']['create_vhostcontainer_servername_statement'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array('1')
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'section_c' => array(
|
||||||
|
'title' => $lng['admin']['ipsandports']['webserverdomainconfig'],
|
||||||
|
'image' => 'icons/ipsports_add.png',
|
||||||
|
'fields' => array(
|
||||||
|
'default_vhostconf_domain' => array(
|
||||||
|
'style' => 'align-top',
|
||||||
|
'label' => $lng['admin']['ipsandports']['default_vhostconf_domain'],
|
||||||
|
'desc' => $lng['serversettings']['default_vhostconf_domain']['description'],
|
||||||
|
'type' => 'textarea',
|
||||||
|
'cols' => 60,
|
||||||
|
'rows' => 12
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'section_d' => array(
|
||||||
|
'title' => $lng['admin']['ipsandports']['webserverssldomainconfig'],
|
||||||
|
'image' => 'icons/ipsports_add.png',
|
||||||
|
'visible' => (Settings::Get('system.use_ssl') == 1 ? true : false),
|
||||||
|
'fields' => array(
|
||||||
|
'ssl' => array(
|
||||||
|
'label' => $lng['admin']['ipsandports']['enable_ssl'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array()
|
||||||
|
),
|
||||||
|
'ssl_cert_file' => array(
|
||||||
|
'label' => $lng['admin']['ipsandports']['ssl_cert_file'],
|
||||||
|
'type' => 'text'
|
||||||
|
),
|
||||||
|
'ssl_key_file' => array(
|
||||||
|
'label' => $lng['admin']['ipsandports']['ssl_key_file'],
|
||||||
|
'type' => 'text'
|
||||||
|
),
|
||||||
|
'ssl_ca_file' => array(
|
||||||
|
'label' => $lng['admin']['ipsandports']['ssl_ca_file'],
|
||||||
|
'type' => 'text'
|
||||||
|
),
|
||||||
|
'ssl_cert_chainfile' => array(
|
||||||
|
'label' => $lng['admin']['ipsandports']['ssl_cert_chainfile']['title'],
|
||||||
|
'desc' => $lng['admin']['ipsandports']['ssl_cert_chainfile']['description'],
|
||||||
|
'type' => 'text'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
146
lib/formfields/admin/ipsandports/formfield.ipsandports_edit.php
Normal file
146
lib/formfields/admin/ipsandports/formfield.ipsandports_edit.php
Normal file
@@ -0,0 +1,146 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file is part of the Froxlor project.
|
||||||
|
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the COPYING
|
||||||
|
* file that was distributed with this source code. You can also view the
|
||||||
|
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
*
|
||||||
|
* @copyright (c) the authors
|
||||||
|
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||||
|
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
* @package Formfields
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'ipsandports_edit' => array(
|
||||||
|
'title' => $lng['admin']['ipsandports']['edit'],
|
||||||
|
'image' => 'icons/ipsports_edit.png',
|
||||||
|
'sections' => array(
|
||||||
|
'section_a' => array(
|
||||||
|
'title' => $lng['admin']['ipsandports']['ipandport'],
|
||||||
|
'image' => 'icons/ipsports_add.png',
|
||||||
|
'fields' => array(
|
||||||
|
'ip' => array(
|
||||||
|
'label' => $lng['admin']['ipsandports']['ip'],
|
||||||
|
'type' => 'text',
|
||||||
|
'value' => $result['ip']
|
||||||
|
),
|
||||||
|
'port' => array(
|
||||||
|
'label' => $lng['admin']['ipsandports']['port'],
|
||||||
|
'type' => 'text',
|
||||||
|
'value' => $result['port'],
|
||||||
|
'size' => 5
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'section_b' => array(
|
||||||
|
'title' => $lng['admin']['ipsandports']['webserverdefaultconfig'],
|
||||||
|
'image' => 'icons/ipsports_edit.png',
|
||||||
|
'fields' => array(
|
||||||
|
'listen_statement' => array(
|
||||||
|
'label' => $lng['admin']['ipsandports']['create_listen_statement'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array($result['listen_statement'])
|
||||||
|
),
|
||||||
|
'namevirtualhost_statement' => array(
|
||||||
|
'label' => $lng['admin']['ipsandports']['create_namevirtualhost_statement'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array($result['namevirtualhost_statement'])
|
||||||
|
),
|
||||||
|
'vhostcontainer' => array(
|
||||||
|
'label' => $lng['admin']['ipsandports']['create_vhostcontainer'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array($result['vhostcontainer'])
|
||||||
|
),
|
||||||
|
'docroot' => array(
|
||||||
|
'label' => $lng['admin']['ipsandports']['docroot']['title'],
|
||||||
|
'desc' => $lng['admin']['ipsandports']['docroot']['description'],
|
||||||
|
'type' => 'text',
|
||||||
|
'value' => $result['docroot']
|
||||||
|
),
|
||||||
|
'specialsettings' => array(
|
||||||
|
'style' => 'align-top',
|
||||||
|
'label' => $lng['admin']['ownvhostsettings'],
|
||||||
|
'desc' => $lng['serversettings']['default_vhostconf']['description'],
|
||||||
|
'type' => 'textarea',
|
||||||
|
'cols' => 60,
|
||||||
|
'rows' => 12,
|
||||||
|
'value' => $result['specialsettings']
|
||||||
|
),
|
||||||
|
'vhostcontainer_servername_statement' => array(
|
||||||
|
'label' => $lng['admin']['ipsandports']['create_vhostcontainer_servername_statement'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array($result['vhostcontainer_servername_statement'])
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'section_c' => array(
|
||||||
|
'title' => $lng['admin']['ipsandports']['webserverdomainconfig'],
|
||||||
|
'image' => 'icons/ipsports_edit.png',
|
||||||
|
'fields' => array(
|
||||||
|
'default_vhostconf_domain' => array(
|
||||||
|
'style' => 'align-top',
|
||||||
|
'label' => $lng['admin']['ipsandports']['default_vhostconf_domain'],
|
||||||
|
'desc' => $lng['serversettings']['default_vhostconf_domain']['description'],
|
||||||
|
'type' => 'textarea',
|
||||||
|
'cols' => 60,
|
||||||
|
'rows' => 12,
|
||||||
|
'value' => $result['default_vhostconf_domain']
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'section_d' => array(
|
||||||
|
'title' => $lng['admin']['ipsandports']['webserverssldomainconfig'],
|
||||||
|
'image' => 'icons/ipsports_edit.png',
|
||||||
|
'visible' => (Settings::Get('system.use_ssl') == 1 ? true : false),
|
||||||
|
'fields' => array(
|
||||||
|
'ssl' => array(
|
||||||
|
'label' => $lng['admin']['ipsandports']['enable_ssl'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array($result['ssl'])
|
||||||
|
),
|
||||||
|
'ssl_cert_file' => array(
|
||||||
|
'label' => $lng['admin']['ipsandports']['ssl_cert_file'],
|
||||||
|
'type' => 'text',
|
||||||
|
'value' => $result['ssl_cert_file']
|
||||||
|
),
|
||||||
|
'ssl_key_file' => array(
|
||||||
|
'label' => $lng['admin']['ipsandports']['ssl_key_file'],
|
||||||
|
'type' => 'text',
|
||||||
|
'value' => $result['ssl_key_file']
|
||||||
|
),
|
||||||
|
'ssl_ca_file' => array(
|
||||||
|
'label' => $lng['admin']['ipsandports']['ssl_ca_file'],
|
||||||
|
'type' => 'text',
|
||||||
|
'value' => $result['ssl_ca_file']
|
||||||
|
),
|
||||||
|
'ssl_cert_chainfile' => array(
|
||||||
|
'label' => $lng['admin']['ipsandports']['ssl_cert_chainfile']['title'],
|
||||||
|
'desc' => $lng['admin']['ipsandports']['ssl_cert_chainfile']['description'],
|
||||||
|
'type' => 'text',
|
||||||
|
'value' => $result['ssl_cert_chainfile']
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
99
lib/formfields/admin/phpconfig/formfield.phpconfig_add.php
Normal file
99
lib/formfields/admin/phpconfig/formfield.phpconfig_add.php
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file is part of the Froxlor project.
|
||||||
|
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the COPYING
|
||||||
|
* file that was distributed with this source code. You can also view the
|
||||||
|
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
*
|
||||||
|
* @copyright (c) the authors
|
||||||
|
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||||
|
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
* @package Formfields
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'phpconfig_add' => array(
|
||||||
|
'title' => $lng['admin']['phpsettings']['addsettings'],
|
||||||
|
'image' => 'icons/phpsettings_add.png',
|
||||||
|
'sections' => array(
|
||||||
|
'section_a' => array(
|
||||||
|
'title' => $lng['admin']['phpsettings']['addsettings'],
|
||||||
|
'image' => 'icons/phpsettings_add.png',
|
||||||
|
'fields' => array(
|
||||||
|
'description' => array(
|
||||||
|
'label' => $lng['admin']['phpsettings']['description'],
|
||||||
|
'type' => 'text',
|
||||||
|
'maxlength' => 50
|
||||||
|
),
|
||||||
|
'binary' => array(
|
||||||
|
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||||
|
'label' => $lng['admin']['phpsettings']['binary'],
|
||||||
|
'type' => 'text',
|
||||||
|
'maxlength' => 255,
|
||||||
|
'value' => '/usr/bin/php-cgi'
|
||||||
|
),
|
||||||
|
'file_extensions' => array(
|
||||||
|
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||||
|
'label' => $lng['admin']['phpsettings']['file_extensions'],
|
||||||
|
'desc' => $lng['admin']['phpsettings']['file_extensions_note'],
|
||||||
|
'type' => 'text',
|
||||||
|
'maxlength' => 255,
|
||||||
|
'value' => 'php'
|
||||||
|
),
|
||||||
|
'mod_fcgid_starter' => array(
|
||||||
|
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||||
|
'label' => $lng['admin']['mod_fcgid_starter']['title'],
|
||||||
|
'type' => 'text'
|
||||||
|
),
|
||||||
|
'mod_fcgid_maxrequests' => array(
|
||||||
|
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||||
|
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
|
||||||
|
'type' => 'text'
|
||||||
|
),
|
||||||
|
'mod_fcgid_umask' => array(
|
||||||
|
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||||
|
'label' => $lng['admin']['mod_fcgid_umask']['title'],
|
||||||
|
'type' => 'text',
|
||||||
|
'maxlength' => 3,
|
||||||
|
'value' => '022'
|
||||||
|
),
|
||||||
|
'phpfpm_enable_slowlog' => array(
|
||||||
|
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||||
|
'label' => $lng['admin']['phpsettings']['enable_slowlog'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array()
|
||||||
|
),
|
||||||
|
'phpfpm_reqtermtimeout' => array(
|
||||||
|
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||||
|
'label' => $lng['admin']['phpsettings']['request_terminate_timeout'],
|
||||||
|
'type' => 'text',
|
||||||
|
'maxlength' => 10,
|
||||||
|
'value' => '60s'
|
||||||
|
),
|
||||||
|
'phpfpm_reqslowtimeout' => array(
|
||||||
|
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||||
|
'label' => $lng['admin']['phpsettings']['request_slowlog_timeout'],
|
||||||
|
'type' => 'text',
|
||||||
|
'maxlength' => 10,
|
||||||
|
'value' => '5s'
|
||||||
|
),
|
||||||
|
'phpsettings' => array(
|
||||||
|
'style' => 'align-top',
|
||||||
|
'label' => $lng['admin']['phpsettings']['phpinisettings'],
|
||||||
|
'type' => 'textarea',
|
||||||
|
'cols' => 80,
|
||||||
|
'rows' => 20,
|
||||||
|
'value' => $result['phpsettings']
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
102
lib/formfields/admin/phpconfig/formfield.phpconfig_edit.php
Normal file
102
lib/formfields/admin/phpconfig/formfield.phpconfig_edit.php
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file is part of the Froxlor project.
|
||||||
|
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the COPYING
|
||||||
|
* file that was distributed with this source code. You can also view the
|
||||||
|
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
*
|
||||||
|
* @copyright (c) the authors
|
||||||
|
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||||
|
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
* @package Formfields
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'phpconfig_edit' => array(
|
||||||
|
'title' => $lng['admin']['phpsettings']['editsettings'],
|
||||||
|
'image' => 'icons/phpsettings_edit.png',
|
||||||
|
'sections' => array(
|
||||||
|
'section_a' => array(
|
||||||
|
'title' => $lng['admin']['phpsettings']['editsettings'],
|
||||||
|
'image' => 'icons/phpsettings_edit.png',
|
||||||
|
'fields' => array(
|
||||||
|
'description' => array(
|
||||||
|
'label' => $lng['admin']['phpsettings']['description'],
|
||||||
|
'type' => 'text',
|
||||||
|
'maxlength' => 50,
|
||||||
|
'value' => $result['description']
|
||||||
|
),
|
||||||
|
'binary' => array(
|
||||||
|
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||||
|
'label' => $lng['admin']['phpsettings']['binary'],
|
||||||
|
'type' => 'text',
|
||||||
|
'maxlength' => 255,
|
||||||
|
'value' => $result['binary']
|
||||||
|
),
|
||||||
|
'file_extensions' => array(
|
||||||
|
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||||
|
'label' => $lng['admin']['phpsettings']['file_extensions'],
|
||||||
|
'desc' => $lng['admin']['phpsettings']['file_extensions_note'],
|
||||||
|
'type' => 'text',
|
||||||
|
'maxlength' => 255,
|
||||||
|
'value' => $result['file_extensions']
|
||||||
|
),
|
||||||
|
'mod_fcgid_starter' => array(
|
||||||
|
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||||
|
'label' => $lng['admin']['mod_fcgid_starter']['title'],
|
||||||
|
'type' => 'text',
|
||||||
|
'value' => ((int)$result['mod_fcgid_starter'] != - 1 ? $result['mod_fcgid_starter'] : '')
|
||||||
|
),
|
||||||
|
'mod_fcgid_maxrequests' => array(
|
||||||
|
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||||
|
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
|
||||||
|
'type' => 'text',
|
||||||
|
'value' => ((int)$result['mod_fcgid_maxrequests'] != - 1 ? $result['mod_fcgid_maxrequests'] : '')
|
||||||
|
),
|
||||||
|
'mod_fcgid_umask' => array(
|
||||||
|
'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false),
|
||||||
|
'label' => $lng['admin']['mod_fcgid_umask']['title'],
|
||||||
|
'type' => 'text',
|
||||||
|
'maxlength' => 3,
|
||||||
|
'value' => $result['mod_fcgid_umask']
|
||||||
|
),
|
||||||
|
'phpfpm_enable_slowlog' => array(
|
||||||
|
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||||
|
'label' => $lng['admin']['phpsettings']['enable_slowlog'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||||
|
),
|
||||||
|
'value' => array($result['fpm_slowlog'])
|
||||||
|
),
|
||||||
|
'phpfpm_reqtermtimeout' => array(
|
||||||
|
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||||
|
'label' => $lng['admin']['phpsettings']['request_terminate_timeout'],
|
||||||
|
'type' => 'text',
|
||||||
|
'maxlength' => 10,
|
||||||
|
'value' => $result['fpm_reqterm']
|
||||||
|
),
|
||||||
|
'phpfpm_reqslowtimeout' => array(
|
||||||
|
'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||||
|
'label' => $lng['admin']['phpsettings']['request_slowlog_timeout'],
|
||||||
|
'type' => 'text',
|
||||||
|
'maxlength' => 10,
|
||||||
|
'value' => $result['fpm_reqslow']
|
||||||
|
),
|
||||||
|
'phpsettings' => array(
|
||||||
|
'style' => 'align-top',
|
||||||
|
'label' => $lng['admin']['phpsettings']['phpinisettings'],
|
||||||
|
'type' => 'textarea',
|
||||||
|
'cols' => 80,
|
||||||
|
'rows' => 20,
|
||||||
|
'value' => $result['phpsettings']
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This file is part of the Froxlor project.
|
|
||||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the COPYING
|
|
||||||
* file that was distributed with this source code. You can also view the
|
|
||||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
*
|
|
||||||
* @copyright (c) the authors
|
|
||||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
|
||||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
|
||||||
* @package Formfields
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
return array(
|
|
||||||
'section_a' => array(
|
|
||||||
'fields' => array(
|
|
||||||
'description' => array(
|
|
||||||
'label' => $lng['mysql']['databasedescription'],
|
|
||||||
'type' => 'text',
|
|
||||||
),
|
|
||||||
'mysql_server' => array(
|
|
||||||
'label' => $lng['mysql']['mysql_server'],
|
|
||||||
'type' => (isset($result)) ? 'select' : 'text',
|
|
||||||
'visible' => (1 < $count_mysqlservers ? true : false),
|
|
||||||
'values' => (isset($mysql_servers)) ? $mysql_servers : ""
|
|
||||||
),
|
|
||||||
'mysql_password' => array(
|
|
||||||
'label' => $lng['login']['password'],
|
|
||||||
'type' => 'password',
|
|
||||||
'attributes' => array(
|
|
||||||
'autocomplete' => 'off'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'mysql_password_suggestion' => array(
|
|
||||||
'label' => $lng['customer']['generated_pwd'],
|
|
||||||
'type' => 'text',
|
|
||||||
'visible' => (Settings::Get('panel.password_regex') == ''),
|
|
||||||
'value' => generatePassword(),
|
|
||||||
'attributes' => array(
|
|
||||||
'readonly' => true
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'sendinfomail' => array(
|
|
||||||
'label' => $lng['customer']['sendinfomail'],
|
|
||||||
'type' => 'checkbox',
|
|
||||||
'visible' => 'new',
|
|
||||||
'attributes' => array(
|
|
||||||
'checked' => true
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
61
lib/formfields/customer/mysql/formfield.mysql_add.php
Normal file
61
lib/formfields/customer/mysql/formfield.mysql_add.php
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file is part of the Froxlor project.
|
||||||
|
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the COPYING
|
||||||
|
* file that was distributed with this source code. You can also view the
|
||||||
|
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
*
|
||||||
|
* @copyright (c) the authors
|
||||||
|
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||||
|
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
* @package Formfields
|
||||||
|
*/
|
||||||
|
return array(
|
||||||
|
'mysql_add' => array(
|
||||||
|
'title' => $lng['mysql']['database_create'],
|
||||||
|
'image' => 'icons/mysql_add.png',
|
||||||
|
'sections' => array(
|
||||||
|
'section_a' => array(
|
||||||
|
'title' => $lng['mysql']['database_create'],
|
||||||
|
'image' => 'icons/mysql_add.png',
|
||||||
|
'fields' => array(
|
||||||
|
'description' => array(
|
||||||
|
'label' => $lng['mysql']['databasedescription'],
|
||||||
|
'type' => 'text'
|
||||||
|
),
|
||||||
|
'mysql_server' => array(
|
||||||
|
'visible' => (1 < $count_mysqlservers ? true : false),
|
||||||
|
'label' => $lng['mysql']['mysql_server'],
|
||||||
|
'type' => 'select',
|
||||||
|
'select_var' => $mysql_servers
|
||||||
|
),
|
||||||
|
'mysql_password' => array(
|
||||||
|
'label' => $lng['login']['password'],
|
||||||
|
'type' => 'password',
|
||||||
|
'autocomplete' => 'off'
|
||||||
|
),
|
||||||
|
'mysql_password_suggestion' => array(
|
||||||
|
'label' => $lng['customer']['generated_pwd'],
|
||||||
|
'type' => 'text',
|
||||||
|
'visible' => (Settings::Get('panel.password_regex') == ''),
|
||||||
|
'value' => generatePassword()
|
||||||
|
),
|
||||||
|
'sendinfomail' => array(
|
||||||
|
'label' => $lng['customer']['sendinfomail'],
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'values' => array(
|
||||||
|
array(
|
||||||
|
'label' => $lng['panel']['yes'],
|
||||||
|
'value' => '1'
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'value' => array()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
56
lib/formfields/customer/mysql/formfield.mysql_edit.php
Normal file
56
lib/formfields/customer/mysql/formfield.mysql_edit.php
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file is part of the Froxlor project.
|
||||||
|
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the COPYING
|
||||||
|
* file that was distributed with this source code. You can also view the
|
||||||
|
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
*
|
||||||
|
* @copyright (c) the authors
|
||||||
|
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||||
|
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
* @package Formfields
|
||||||
|
*/
|
||||||
|
return array(
|
||||||
|
'mysql_edit' => array(
|
||||||
|
'title' => $lng['mysql']['database_edit'],
|
||||||
|
'image' => 'icons/mysql_edit.png',
|
||||||
|
'sections' => array(
|
||||||
|
'section_a' => array(
|
||||||
|
'title' => $lng['mysql']['database_edit'],
|
||||||
|
'image' => 'icons/mysql_edit.png',
|
||||||
|
'fields' => array(
|
||||||
|
'databasename' => array(
|
||||||
|
'label' => $lng['mysql']['databasename'],
|
||||||
|
'type' => 'label',
|
||||||
|
'value' => $result['databasename']
|
||||||
|
),
|
||||||
|
'description' => array(
|
||||||
|
'label' => $lng['mysql']['databasedescription'],
|
||||||
|
'type' => 'text',
|
||||||
|
'value' => $result['description']
|
||||||
|
),
|
||||||
|
'mysql_server' => array(
|
||||||
|
'visible' => (1 < $count_mysqlservers ? true : false),
|
||||||
|
'label' => $lng['mysql']['mysql_server'],
|
||||||
|
'type' => 'label',
|
||||||
|
'value' => $sql_root['caption']
|
||||||
|
),
|
||||||
|
'mysql_password' => array(
|
||||||
|
'label' => $lng['changepassword']['new_password_ifnotempty'],
|
||||||
|
'type' => 'password',
|
||||||
|
'autocomplete' => 'off'
|
||||||
|
),
|
||||||
|
'mysql_password_suggestion' => array(
|
||||||
|
'label' => $lng['customer']['generated_pwd'],
|
||||||
|
'type' => 'text',
|
||||||
|
'visible' => (Settings::Get('panel.password_regex') == ''),
|
||||||
|
'value' => generatePassword()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Main version variable
|
// Main version variable
|
||||||
$version = '0.9.34-dev4';
|
$version = '0.9.34';
|
||||||
|
|
||||||
// Database version (unused, old stuff from SysCP)
|
// Database version (unused, old stuff from SysCP)
|
||||||
$dbversion = '2';
|
$dbversion = '2';
|
||||||
|
|||||||
@@ -424,8 +424,16 @@ class apache extends HttpConfigBase {
|
|||||||
if ($domain['phpenabled'] == '1') {
|
if ($domain['phpenabled'] == '1') {
|
||||||
// This vHost has PHP enabled and we are using the regular mod_php
|
// This vHost has PHP enabled and we are using the regular mod_php
|
||||||
|
|
||||||
if ($domain['openbasedir'] == '1') {
|
if ($domain['openbasedir'] == '1')
|
||||||
|
{
|
||||||
|
if ($domain['openbasedir_path'] == '1' || strstr($domain['documentroot'], ":") !== false)
|
||||||
|
{
|
||||||
$_phpappendopenbasedir = appendOpenBasedirPath($domain['customerroot'], true);
|
$_phpappendopenbasedir = appendOpenBasedirPath($domain['customerroot'], true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$_phpappendopenbasedir = appendOpenBasedirPath($domain['documentroot'], true);
|
||||||
|
}
|
||||||
|
|
||||||
$_custom_openbasedir = explode(':', Settings::Get('system.phpappendopenbasedir'));
|
$_custom_openbasedir = explode(':', Settings::Get('system.phpappendopenbasedir'));
|
||||||
foreach ($_custom_openbasedir as $cobd) {
|
foreach ($_custom_openbasedir as $cobd) {
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ $header
|
|||||||
<article>
|
<article>
|
||||||
<header>
|
<header>
|
||||||
<h2>
|
<h2>
|
||||||
<img src="templates/{$theme}/assets/img/icons/user_add_big.png" />
|
<img src="templates/{$theme}/assets/img/icons/user_add_big.png" alt="{$title}" />
|
||||||
{$lng['admin']['admin_add']}
|
{$title}
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ $header
|
|||||||
<article>
|
<article>
|
||||||
<header>
|
<header>
|
||||||
<h2>
|
<h2>
|
||||||
<img src="templates/{$theme}/assets/img/icons/user_edit_big.png" /> {$lng['admin']['admin_edit']}
|
<img src="templates/{$theme}/assets/img/icons/user_edit_big.png" alt="{$title}" /> {$title}
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ $header
|
|||||||
<article>
|
<article>
|
||||||
<header>
|
<header>
|
||||||
<h2>
|
<h2>
|
||||||
<img src="templates/{$theme}/assets/img/icons/clock_edit_big.png" />
|
<img src="templates/{$theme}/assets/img/icons/clock_edit_big.png" alt="{$title}" />
|
||||||
{$lng['admin']['cronjob_edit']}
|
{$title}
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ $header
|
|||||||
<article>
|
<article>
|
||||||
<header>
|
<header>
|
||||||
<h2>
|
<h2>
|
||||||
<img src="templates/{$theme}/assets/img/icons/user_add_big.png" alt="{$lng['admin']['customer_add']}" />
|
<img src="templates/{$theme}/assets/img/icons/user_add_big.png" alt="{$title}" />
|
||||||
{$lng['admin']['customer_add']}
|
{$title}
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ $header
|
|||||||
<article>
|
<article>
|
||||||
<header>
|
<header>
|
||||||
<h2>
|
<h2>
|
||||||
<img src="templates/{$theme}/assets/img/icons/user_edit_big.png" />
|
<img src="templates/{$theme}/assets/img/icons/user_edit_big.png" alt="{$title}" />
|
||||||
{$lng['admin']['customer_edit']}
|
{$title}
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ $header
|
|||||||
<header>
|
<header>
|
||||||
<h2>
|
<h2>
|
||||||
<img src="templates/{$theme}/assets/img/icons/domain_add_big.png" alt="{$title}" />
|
<img src="templates/{$theme}/assets/img/icons/domain_add_big.png" alt="{$title}" />
|
||||||
{$lng['domains']['domain_import']}
|
{$title}
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|||||||
4
templates/Sparkle/assets/css/main.css
vendored
4
templates/Sparkle/assets/css/main.css
vendored
@@ -573,7 +573,7 @@ input {
|
|||||||
border-radius:3px;
|
border-radius:3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[disabled] {
|
input[disabled], input[readonly] {
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
background-color: #eee;
|
background-color: #eee;
|
||||||
}
|
}
|
||||||
@@ -587,7 +587,7 @@ textarea {
|
|||||||
border-radius:3px;
|
border-radius:3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="text"],input[type="password"] {
|
input[type="text"],input[type="password"],input[type="text"] {
|
||||||
width:400px;
|
width:400px;
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|||||||
4
templates/Sparkle/assets/js/main.js
vendored
4
templates/Sparkle/assets/js/main.js
vendored
@@ -53,13 +53,13 @@ $(document).ready(function() {
|
|||||||
$("input[name$='_ul']").each(function() {
|
$("input[name$='_ul']").each(function() {
|
||||||
var fieldname = $(this).attr("name").substring(0, $(this).attr("name").length - 3);
|
var fieldname = $(this).attr("name").substring(0, $(this).attr("name").length - 3);
|
||||||
$("input[name='" + fieldname + "']").prop({
|
$("input[name='" + fieldname + "']").prop({
|
||||||
disabled: $(this).is(":checked")
|
readonly: $(this).is(":checked")
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
$("input[name$='_ul']").change(function() {
|
$("input[name$='_ul']").change(function() {
|
||||||
var fieldname = $(this).attr("name").substring(0, $(this).attr("name").length - 3);
|
var fieldname = $(this).attr("name").substring(0, $(this).attr("name").length - 3);
|
||||||
$("input[name='" + fieldname + "']").prop({
|
$("input[name='" + fieldname + "']").prop({
|
||||||
disabled: $(this).is(":checked")
|
readonly: $(this).is(":checked")
|
||||||
}).focus();
|
}).focus();
|
||||||
});
|
});
|
||||||
// Enable autoselect in configfules
|
// Enable autoselect in configfules
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ $header
|
|||||||
<article>
|
<article>
|
||||||
<header>
|
<header>
|
||||||
<h2>
|
<h2>
|
||||||
<img src="templates/{$theme}/assets/img/icons/mysql_add_big.png" />
|
<img src="templates/{$theme}/assets/img/icons/mysql_add_big.png" alt="{$title}" />
|
||||||
{$lng['mysql']['database_create']}
|
{$title}
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ $header
|
|||||||
<article>
|
<article>
|
||||||
<header>
|
<header>
|
||||||
<h2>
|
<h2>
|
||||||
<img src="templates/{$theme}/assets/img/icons/mysql_edit_big.png" />
|
<img src="templates/{$theme}/assets/img/icons/mysql_edit_big.png" alt="{$title}" />
|
||||||
{$lng['mysql']['database_edit']}
|
{$title}
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|||||||
1
templates/Sparkle/htmlform/checkbox.tpl
vendored
1
templates/Sparkle/htmlform/checkbox.tpl
vendored
@@ -1 +0,0 @@
|
|||||||
<label><input {$attributes} /><if $labelHidden == false>{$label}</if></label>
|
|
||||||
8
templates/Sparkle/htmlform/form_end.tpl
vendored
8
templates/Sparkle/htmlform/form_end.tpl
vendored
@@ -1,8 +0,0 @@
|
|||||||
<tfoot>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2" class="right">
|
|
||||||
<input type="reset" value="{$lng['panel']['cancel']}" class="historyback" />
|
|
||||||
<input type="submit" value="{$lng['panel']['save']}" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tfoot>
|
|
||||||
9
templates/Sparkle/htmlform/group_heading.tpl
vendored
9
templates/Sparkle/htmlform/group_heading.tpl
vendored
@@ -1,9 +0,0 @@
|
|||||||
<tr class="section">
|
|
||||||
<th>
|
|
||||||
{$grouptitle}
|
|
||||||
</th>
|
|
||||||
<th class="right">
|
|
||||||
<input type="reset" value="{$lng['panel']['cancel']}" class="historyback" />
|
|
||||||
<input type="submit" value="{$lng['panel']['save']}" />
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
1
templates/Sparkle/htmlform/input.tpl
vendored
1
templates/Sparkle/htmlform/input.tpl
vendored
@@ -1 +0,0 @@
|
|||||||
<input {$attributes} />
|
|
||||||
1
templates/Sparkle/htmlform/inputul.tpl
vendored
1
templates/Sparkle/htmlform/inputul.tpl
vendored
@@ -1 +0,0 @@
|
|||||||
<input {$attributes_input} /> <label><input {$attributes_checkbox} />{$label_checkbox}</label>
|
|
||||||
3
templates/Sparkle/htmlform/select.tpl
vendored
3
templates/Sparkle/htmlform/select.tpl
vendored
@@ -1,3 +0,0 @@
|
|||||||
<select name="{$fieldname}" {$attributes}>
|
|
||||||
{$values}
|
|
||||||
</select>
|
|
||||||
4
templates/Sparkle/htmlform/skeleton.tpl
vendored
4
templates/Sparkle/htmlform/skeleton.tpl
vendored
@@ -1,4 +0,0 @@
|
|||||||
<tr>
|
|
||||||
<td><label for="{$fieldname}">{$label}</label><if $desc != ''><br /><small>{$desc}</small></if></td>
|
|
||||||
<td>{$field}</td>
|
|
||||||
</tr>
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
<tr>
|
|
||||||
<td><label for="{$fieldname}">{$label}</label><if $desc != ''><br /><small>{$desc}</small></if></td>
|
|
||||||
<td>{$field}</td>
|
|
||||||
</tr>
|
|
||||||
1
templates/Sparkle/htmlform/static.tpl
vendored
1
templates/Sparkle/htmlform/static.tpl
vendored
@@ -1 +0,0 @@
|
|||||||
{$value}
|
|
||||||
1
templates/Sparkle/htmlform/textarea.tpl
vendored
1
templates/Sparkle/htmlform/textarea.tpl
vendored
@@ -1 +0,0 @@
|
|||||||
<textarea {$attributes}>{$value}</textarea>
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
<IfModule mod_fastcgi.c>
|
|
||||||
FastCgiIpcDir <FPM_IPCDIR>
|
|
||||||
|
|
||||||
<Location "/fastcgiphp">
|
|
||||||
Order Deny,Allow
|
|
||||||
Deny from All
|
|
||||||
# Prevent accessing this path directly
|
|
||||||
Allow from env=REDIRECT_STATUS
|
|
||||||
</Location>
|
|
||||||
</IfModule>
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
##VERSION: $Id: authdaemonrc.in,v 1.8 2001/10/07 02:16:22 mrsam Exp $
|
|
||||||
#
|
|
||||||
# Copyright 2000-2001 Double Precision, Inc. See COPYING for
|
|
||||||
# distribution information.
|
|
||||||
#
|
|
||||||
# authdaemonrc created from authdaemonrc.dist by sysconftool
|
|
||||||
#
|
|
||||||
# Do not alter lines that begin with ##, they are used when upgrading
|
|
||||||
# this configuration.
|
|
||||||
#
|
|
||||||
# This file configures authdaemond, the resident authentication daemon.
|
|
||||||
#
|
|
||||||
# Comments in this file are ignored. Although this file is intended to
|
|
||||||
# be sourced as a shell script, authdaemond parses it manually, so
|
|
||||||
# the acceptable syntax is a bit limited. Multiline variable contents,
|
|
||||||
# with the \ continuation character, are not allowed. Everything must
|
|
||||||
# fit on one line. Do not use any additional whitespace for indentation,
|
|
||||||
# or anything else.
|
|
||||||
|
|
||||||
##NAME: authmodulelist:0
|
|
||||||
#
|
|
||||||
# The authentication modules that are linked into authdaemond. The
|
|
||||||
# default list is installed. You may selectively disable modules simply
|
|
||||||
# by removing them from the following list. The available modules you
|
|
||||||
# can use are: authcustom authcram authuserdb authldap authmysql authpam
|
|
||||||
|
|
||||||
authmodulelist="authmysql"
|
|
||||||
|
|
||||||
##NAME: authmodulelistorig:1
|
|
||||||
#
|
|
||||||
# This setting is used by Courier's webadmin module, and should be left
|
|
||||||
# alone
|
|
||||||
|
|
||||||
authmodulelistorig="authcustom authcram authuserdb authldap authmysql authpam"
|
|
||||||
|
|
||||||
##NAME: daemons:0
|
|
||||||
#
|
|
||||||
# The number of daemon processes that are started. authdaemon is typically
|
|
||||||
# installed where authentication modules are relatively expensive: such
|
|
||||||
# as authldap, or authmysql, so it's better to have a number of them running.
|
|
||||||
# PLEASE NOTE: Some platforms may experience a problem if there's more than
|
|
||||||
# one daemon. Specifically, SystemV derived platforms that use TLI with
|
|
||||||
# socket emulation. I'm suspicious of TLI's ability to handle multiple
|
|
||||||
# processes accepting connections on the same filesystem domain socket.
|
|
||||||
#
|
|
||||||
# You may need to increase daemons if as your system load increases. Symptoms
|
|
||||||
# include sporadic authentication failures. If you start getting
|
|
||||||
# authentication failures, increase daemons. However, the default of 5
|
|
||||||
# SHOULD be sufficient. Bumping up daemon count is only a short-term
|
|
||||||
# solution. The permanent solution is to add more resources: RAM, faster
|
|
||||||
# disks, faster CPUs...
|
|
||||||
|
|
||||||
daemons=5
|
|
||||||
|
|
||||||
##NAME: version:0
|
|
||||||
#
|
|
||||||
# When you have multiple versions of authdaemond.* installed, authdaemond
|
|
||||||
# just picks the first one it finds. Set "version" to override that.
|
|
||||||
# For example: version=authdaemond.plain
|
|
||||||
|
|
||||||
version=""
|
|
||||||
|
|
||||||
##NAME: authdaemonvar:0
|
|
||||||
#
|
|
||||||
# authdaemonvar is here, but is not used directly by authdaemond. It's
|
|
||||||
# used by various configuration and build scripts, so don't touch it!
|
|
||||||
|
|
||||||
authdaemonvar=/var/run/courier/authdaemon
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
MYSQL_SERVER <SQL_HOST>
|
|
||||||
MYSQL_USERNAME <SQL_UNPRIVILEGED_USER>
|
|
||||||
MYSQL_PASSWORD <SQL_UNPRIVILEGED_PASSWORD>
|
|
||||||
MYSQL_PORT 3306
|
|
||||||
MYSQL_DATABASE <SQL_DB>
|
|
||||||
MYSQL_USER_TABLE mail_users
|
|
||||||
MYSQL_CRYPT_PWFIELD password_enc
|
|
||||||
MYSQL_UID_FIELD uid
|
|
||||||
MYSQL_GID_FIELD gid
|
|
||||||
MYSQL_LOGIN_FIELD username
|
|
||||||
MYSQL_HOME_FIELD homedir
|
|
||||||
MYSQL_MAILDIR_FIELD maildir
|
|
||||||
MYSQL_QUOTA_FIELD (quota*1024*1024)
|
|
||||||
MYSQL_AUXOPTIONS_FIELD CONCAT("allowimap=",imap,",allowpop3=",pop3)
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#
|
|
||||||
# Set PATH, otherwise restart-scripts won't find start-stop-daemon
|
|
||||||
#
|
|
||||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
|
||||||
#
|
|
||||||
# Regular cron jobs for the froxlor package
|
|
||||||
#
|
|
||||||
# Please check that all following paths are correct
|
|
||||||
#
|
|
||||||
*/5 * * * * root /usr/bin/nice -n 5 /usr/bin/php5 -q <BASE_PATH>scripts/froxlor_master_cronjob.php
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#
|
|
||||||
# !!! DO NOT REPLACE THE ORIGINAL CONFIG WITH THIS FILE !!!
|
|
||||||
#
|
|
||||||
# Instead, just set the shown values in the file to the
|
|
||||||
# given values ;-)
|
|
||||||
#
|
|
||||||
|
|
||||||
Syslog yes
|
|
||||||
Domain /etc/postfix/dkim/domains
|
|
||||||
KeyList /etc/postfix/dkim/dkim-keys.conf
|
|
||||||
Socket inet:8891@localhost
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
driver = mysql
|
|
||||||
connect = host=<SQL_HOST> dbname=<SQL_DB> user=<SQL_UNPRIVILEGED_USER> password=<SQL_UNPRIVILEGED_PASSWORD>
|
|
||||||
default_pass_scheme = CRYPT
|
|
||||||
password_query = SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('maildir:storage=', (quota*1024)) as userdb_quota FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR '%Ls' = 'smtp' OR '%Ls' = 'sieve')
|
|
||||||
user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir, maildir) AS mail, uid, gid, CONCAT('*:storage=', (quota*1024)) as quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u')
|
|
||||||
@@ -1,87 +0,0 @@
|
|||||||
protocols = imap pop3 <SSLPROTOCOLS>
|
|
||||||
listen = *
|
|
||||||
mail_access_groups = vmail
|
|
||||||
mail_debug = no
|
|
||||||
## allow Plaintext Logins from foreign IP if the Connection doesn't use TLS
|
|
||||||
disable_plaintext_auth = no
|
|
||||||
|
|
||||||
### SSL Settings
|
|
||||||
### After setting this options, set disable_plaintext_auth to yes (see above)
|
|
||||||
### and add imaps pop3s to the protocols
|
|
||||||
#ssl_cert_file = /etc/ssl/server/<SERVERNAME>.pem
|
|
||||||
#ssl_key_file = /etc/ssl/server/<SERVERNAME>.key
|
|
||||||
## This is an example with CACerts class3 cert!
|
|
||||||
#ssl_ca_file = /path/to/cacert.class3.crt
|
|
||||||
#ssl_cipher_list = ALL:!LOW:!SSLv2
|
|
||||||
|
|
||||||
protocol imap {
|
|
||||||
mail_plugins = quota imap_quota
|
|
||||||
# IMAP logout format string:
|
|
||||||
# %i - total number of bytes read from client
|
|
||||||
# %o - total number of bytes sent to client
|
|
||||||
imap_logout_format = in=%i out=%o
|
|
||||||
}
|
|
||||||
|
|
||||||
protocol pop3 {
|
|
||||||
# leave this uncommented if you are migrating from Courier also see Migration from Courier
|
|
||||||
pop3_uidl_format = UID%u-%v
|
|
||||||
mail_plugins = quota
|
|
||||||
# POP3 logout format string:
|
|
||||||
# %i - total number of bytes read from client
|
|
||||||
# %o - total number of bytes sent to client
|
|
||||||
# %t - number of TOP commands
|
|
||||||
# %p - number of bytes sent to client as a result of TOP command
|
|
||||||
# %r - number of RETR commands
|
|
||||||
# %b - number of bytes sent to client as a result of RETR command
|
|
||||||
# %d - number of deleted messages
|
|
||||||
# %m - number of messages (before deletion)
|
|
||||||
# %s - mailbox size in bytes (before deletion)
|
|
||||||
# %u - old/new UIDL hash. may help finding out if UIDLs changed unexpectedly
|
|
||||||
pop3_logout_format = in=%i out=%o top=%t/%p retr=%r/%b del=%d/%m size=%s
|
|
||||||
}
|
|
||||||
|
|
||||||
protocol lda {
|
|
||||||
# postmaster is the one in charge of the mail system. MUST be set to a valid address!
|
|
||||||
postmaster_address = postmaster@<SERVERNAME>
|
|
||||||
auth_socket_path = /var/run/dovecot/auth-master
|
|
||||||
mail_plugins = quota
|
|
||||||
sendmail_path = /usr/sbin/sendmail
|
|
||||||
}
|
|
||||||
|
|
||||||
auth default {
|
|
||||||
mechanisms = plain login
|
|
||||||
passdb sql {
|
|
||||||
args = /etc/dovecot/dovecot-sql.conf
|
|
||||||
}
|
|
||||||
|
|
||||||
userdb prefetch {
|
|
||||||
}
|
|
||||||
|
|
||||||
userdb sql {
|
|
||||||
args = /etc/dovecot/dovecot-sql.conf
|
|
||||||
}
|
|
||||||
|
|
||||||
user = vmail
|
|
||||||
socket listen {
|
|
||||||
# Postfix uses the client socket for SMTP Auth
|
|
||||||
client {
|
|
||||||
# Assuming the default Postfix $queue_directory setting
|
|
||||||
path = /var/spool/postfix/private/auth
|
|
||||||
mode = 0660
|
|
||||||
# Assuming the default Postfix user and group
|
|
||||||
user = postfix
|
|
||||||
group = postfix
|
|
||||||
}
|
|
||||||
# Note that we're setting a master socket. SMTP AUTH for Postfix and Exim uses client sockets.
|
|
||||||
master {
|
|
||||||
path = /var/run/dovecot/auth-master
|
|
||||||
mode = 0660
|
|
||||||
user = vmail
|
|
||||||
group = vmail
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
plugin {
|
|
||||||
quota = maildir
|
|
||||||
}
|
|
||||||
@@ -1,125 +0,0 @@
|
|||||||
### acl/30_exim4-config_check_rcpt
|
|
||||||
#################################
|
|
||||||
|
|
||||||
acl_check_rcpt:
|
|
||||||
accept
|
|
||||||
hosts = :
|
|
||||||
|
|
||||||
warn
|
|
||||||
hosts = +relay_from_hosts
|
|
||||||
control = submission/sender_retain
|
|
||||||
|
|
||||||
.ifdef CHECK_RCPT_LOCAL_LOCALPARTS
|
|
||||||
deny
|
|
||||||
domains = +local_domains:+froxlor_domain
|
|
||||||
local_parts = CHECK_RCPT_LOCAL_LOCALPARTS
|
|
||||||
message = restricted characters in address
|
|
||||||
.endif
|
|
||||||
|
|
||||||
.ifdef CHECK_RCPT_REMOTE_LOCALPARTS
|
|
||||||
deny
|
|
||||||
domains = !+local_domains
|
|
||||||
local_parts = CHECK_RCPT_REMOTE_LOCALPARTS
|
|
||||||
message = restricted characters in address
|
|
||||||
.endif
|
|
||||||
|
|
||||||
accept
|
|
||||||
.ifndef CHECK_RCPT_POSTMASTER
|
|
||||||
local_parts = postmaster
|
|
||||||
.else
|
|
||||||
local_parts = CHECK_RCPT_POSTMASTER
|
|
||||||
.endif
|
|
||||||
domains = +local_domains:+froxlor_domain
|
|
||||||
|
|
||||||
deny
|
|
||||||
message = sender envelope address $sender_address is locally blacklisted here. If you think this is wrong, get in touch with postmaster
|
|
||||||
!acl = acl_local_deny_exceptions
|
|
||||||
senders = ${if exists{CONFDIR/local_sender_blacklist}\
|
|
||||||
{CONFDIR/local_sender_blacklist}\
|
|
||||||
{}}
|
|
||||||
|
|
||||||
deny
|
|
||||||
message = sender IP address $sender_host_address is locally blacklisted here. If you think this is wrong, get in touch with postmaster
|
|
||||||
!acl = acl_local_deny_exceptions
|
|
||||||
hosts = ${if exists{CONFDIR/local_host_blacklist}\
|
|
||||||
{CONFDIR/local_host_blacklist}\
|
|
||||||
{}}
|
|
||||||
|
|
||||||
.ifdef CHECK_RCPT_VERIFY_SENDER
|
|
||||||
deny
|
|
||||||
message = Sender verification failed
|
|
||||||
!acl = acl_local_deny_exceptions
|
|
||||||
!verify = sender
|
|
||||||
.endif
|
|
||||||
|
|
||||||
deny
|
|
||||||
!acl = acl_local_deny_exceptions
|
|
||||||
senders = ${if exists{CONFDIR/local_sender_callout}\
|
|
||||||
{CONFDIR/local_sender_callout}\
|
|
||||||
{}}
|
|
||||||
!verify = sender/callout
|
|
||||||
|
|
||||||
deny
|
|
||||||
!acl = acl_local_deny_exceptions
|
|
||||||
recipients = ${if exists{CONFDIR/local_rcpt_callout}\
|
|
||||||
{CONFDIR/local_rcpt_callout}\
|
|
||||||
{}}
|
|
||||||
!verify = recipient/callout
|
|
||||||
|
|
||||||
.ifdef CHECK_RCPT_REVERSE_DNS
|
|
||||||
warn
|
|
||||||
message = X-Host-Lookup-Failed: Reverse DNS lookup failed for $sender_host_address (${if eq{$host_lookup_failed}{1}{failed}{deferred}})
|
|
||||||
condition = ${if and{{def:sender_host_address}{!def:sender_host_name}}\
|
|
||||||
{yes}{no}}
|
|
||||||
.endif
|
|
||||||
|
|
||||||
.ifdef CHECK_RCPT_IP_DNSBLS
|
|
||||||
warn
|
|
||||||
message = X-Warning: $sender_host_address is listed at $dnslist_domain ($dnslist_value: $dnslist_text)
|
|
||||||
log_message = $sender_host_address is listed at $dnslist_domain ($dnslist_value: $dnslist_text)
|
|
||||||
dnslists = CHECK_RCPT_IP_DNSBLS
|
|
||||||
.endif
|
|
||||||
|
|
||||||
.ifdef CHECK_RCPT_DOMAIN_DNSBLS
|
|
||||||
warn
|
|
||||||
message = X-Warning: $sender_address_domain is listed at $dnslist_domain ($dnslist_value: $dnslist_text)
|
|
||||||
log_message = $sender_address_domain is listed at $dnslist_domain ($dnslist_value: $dnslist_text)
|
|
||||||
!senders = ${if exists{CONFDIR/local_domain_dnsbl_whitelist}\
|
|
||||||
{CONFDIR/local_domain_dnsbl_whitelist}\
|
|
||||||
{}}
|
|
||||||
dnslists = CHECK_RCPT_DOMAIN_DNSBLS/$sender_address_domain
|
|
||||||
.endif
|
|
||||||
|
|
||||||
.ifdef CHECK_RCPT_LOCAL_ACL_FILE
|
|
||||||
.include CHECK_RCPT_LOCAL_ACL_FILE
|
|
||||||
.endif
|
|
||||||
|
|
||||||
accept
|
|
||||||
domains = +local_domains:+froxlor_domain
|
|
||||||
endpass
|
|
||||||
message = unknown user
|
|
||||||
verify = recipient
|
|
||||||
|
|
||||||
accept
|
|
||||||
domains = +relay_to_domains
|
|
||||||
endpass
|
|
||||||
.ifdef CHECK_RCPT_GIVE_UNKNOWN_USER
|
|
||||||
message = ${if eq{$acl_verify_message}{Unrouteable address}{unknown user}{$acl_verify_message}}
|
|
||||||
.else
|
|
||||||
message = unrouteable address
|
|
||||||
.endif
|
|
||||||
verify = recipient
|
|
||||||
|
|
||||||
############
|
|
||||||
# If control reaches this point, the domain is neither in +local_domains
|
|
||||||
# nor in +relay_to_domains.
|
|
||||||
############
|
|
||||||
|
|
||||||
accept
|
|
||||||
hosts = +relay_from_hosts
|
|
||||||
|
|
||||||
accept
|
|
||||||
authenticated = *
|
|
||||||
|
|
||||||
deny
|
|
||||||
message = relay not permitted
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
### auth/30_froxlor-config
|
|
||||||
#################################
|
|
||||||
|
|
||||||
plain_server:
|
|
||||||
driver = plaintext
|
|
||||||
public_name = PLAIN
|
|
||||||
server_condition = "${if and { \
|
|
||||||
{!eq{$2}{}} \
|
|
||||||
{!eq{$3}{}} \
|
|
||||||
{crypteq{$3}{${lookup mysql{FROXLOR_AUTH_PLAIN}{$value}fail}}} \
|
|
||||||
} {yes}{no}}"
|
|
||||||
server_set_id = $2
|
|
||||||
server_prompts = :
|
|
||||||
# .ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS
|
|
||||||
# server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}}
|
|
||||||
# .endif
|
|
||||||
|
|
||||||
login_server:
|
|
||||||
driver = plaintext
|
|
||||||
public_name = LOGIN
|
|
||||||
server_prompts = "Username:: : Password::"
|
|
||||||
server_condition = "${if and { \
|
|
||||||
{!eq{$1}{}} \
|
|
||||||
{!eq{$2}{}} \
|
|
||||||
{crypteq{$2}{${lookup mysql{FROXLOR_AUTH_LOGIN}{$value}fail}}} \
|
|
||||||
} {yes}{no}}"
|
|
||||||
server_set_id = $1
|
|
||||||
# .ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS
|
|
||||||
# server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}}
|
|
||||||
# .endif
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
hide mysql_servers = <SQL_HOST>/<SQL_DB>/<SQL_UNPRIVILEGED_USER>/<SQL_UNPRIVILEGED_PASSWORD>
|
|
||||||
|
|
||||||
FROXLOR_LOCAL_DOMAIN = SELECT domain FROM panel_domains WHERE domain = '${quote_mysql:$domain}' AND isemaildomain = '1'
|
|
||||||
|
|
||||||
FROXLOR_MAILALIAS = SELECT REPLACE(destination,' ',',') FROM mail_virtual WHERE \
|
|
||||||
(( email = '${quote_mysql:$local_part}@${quote_mysql:$domain}' ) \
|
|
||||||
OR ( email = '@${quote_mysql:$domain}' AND iscatchall > 0 )) \
|
|
||||||
AND destination <> '' AND destination <> ' ' ORDER BY iscatchall ASC LIMIT 1
|
|
||||||
|
|
||||||
FROXLOR_MAILUSER = SELECT CONCAT(homedir,maildir) FROM mail_users WHERE \
|
|
||||||
email = '${quote_mysql:$local_part}@${quote_mysql:$domain}' AND postfix = 'y'
|
|
||||||
|
|
||||||
FROXLOR_PARENT_DOMAIN = SELECT parent.domain FROM `panel_domains` AS parent INNER JOIN panel_domains AS alias \
|
|
||||||
ON alias.domain = '${quote_mysql:$domain}' AND parent.id = alias.aliasdomain
|
|
||||||
|
|
||||||
FROXLOR_AUTH_PLAIN = SELECT password_enc FROM mail_users WHERE username = '${quote_mysql:$2}'
|
|
||||||
|
|
||||||
FROXLOR_AUTH_LOGIN = SELECT password_enc FROM mail_users WHERE username = '${quote_mysql:$1}'
|
|
||||||
|
|
||||||
domainlist froxlor_domain = mysql;FROXLOR_LOCAL_DOMAIN
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
froxlor_mailalias:
|
|
||||||
debug_print = "R: froxlor_mailalias for $local_part@$domain"
|
|
||||||
driver = redirect
|
|
||||||
domains = +froxlor_domain
|
|
||||||
data = ${lookup mysql {FROXLOR_MAILALIAS}{$value}fail}
|
|
||||||
|
|
||||||
froxlor_mailuser:
|
|
||||||
debug_print = "R: froxlor_mailuser for $local_part@$domain"
|
|
||||||
driver = redirect
|
|
||||||
domains = +froxlor_domain
|
|
||||||
data = ${lookup mysql {FROXLOR_MAILUSER}{$value}fail}
|
|
||||||
directory_transport = maildir_froxlor
|
|
||||||
no_more
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
maildir_froxlor:
|
|
||||||
debug_print = "T: maildir_froxlor for $local_part@$domain"
|
|
||||||
driver = appendfile
|
|
||||||
create_directory
|
|
||||||
delivery_date_add
|
|
||||||
envelope_to_add
|
|
||||||
return_path_add
|
|
||||||
maildir_format
|
|
||||||
directory_mode = 0770
|
|
||||||
mode = 0660
|
|
||||||
mode_fail_narrower = false
|
|
||||||
user = 2000
|
|
||||||
group = 2000
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
conf.version = 2;
|
|
||||||
shadow.host = inet:<SQL_HOST>:3306;
|
|
||||||
shadow.database = <SQL_DB>;
|
|
||||||
shadow.db_user = <SQL_UNPRIVILEGED_USER>;
|
|
||||||
shadow.db_password = <SQL_UNPRIVILEGED_PASSWORD>;
|
|
||||||
shadow.table = ftp_users u;
|
|
||||||
shadow.where_clause = ;
|
|
||||||
shadow.userid_column = u.customerid;
|
|
||||||
shadow.user_column = u.username;
|
|
||||||
shadow.password_column = u.password;
|
|
||||||
shadow.lastchange_column = FLOOR(UNIX_TIMESTAMP()/86400-1);
|
|
||||||
shadow.min_column = 0;
|
|
||||||
shadow.max_column = 99999;
|
|
||||||
shadow.warn_column = 7;
|
|
||||||
shadow.inact_column = -1;
|
|
||||||
shadow.expire_column = -1;
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
conf.version = 2;
|
|
||||||
users.host = inet:<SQL_HOST>:3306;
|
|
||||||
users.database = <SQL_DB>;
|
|
||||||
users.db_user = <SQL_UNPRIVILEGED_USER>;
|
|
||||||
users.db_password = <SQL_UNPRIVILEGED_PASSWORD>;
|
|
||||||
users.table = ftp_users u;
|
|
||||||
users.where_clause = u.login_enabled = 'Y';
|
|
||||||
users.user_column = u.username;
|
|
||||||
users.password_column = u.password;
|
|
||||||
users.userid_column = u.customerid;
|
|
||||||
users.uid_column = u.uid;
|
|
||||||
users.gid_column = u.gid;
|
|
||||||
users.realname_column = u.username;
|
|
||||||
users.homedir_column = u.homedir;
|
|
||||||
users.shell_column = u.shell;
|
|
||||||
groups.group_info_table = ftp_groups g;
|
|
||||||
groups.where_clause = ;
|
|
||||||
groups.group_name_column = g.groupname;
|
|
||||||
groups.groupid_column = g.id;
|
|
||||||
groups.gid_column = g.gid;
|
|
||||||
groups.password_column = "x";
|
|
||||||
groups.members_table = ftp_groups ug;
|
|
||||||
groups.member_userid_column = ug.customerid;
|
|
||||||
groups.member_groupid_column = ug.id;
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
# Make sure that `passwd`, `group` and `shadow` have mysql in their lines
|
|
||||||
# You should place mysql at the end, so that it is queried after the other mechanisams
|
|
||||||
#
|
|
||||||
passwd: compat mysql
|
|
||||||
group: compat mysql
|
|
||||||
shadow: compat mysql
|
|
||||||
|
|
||||||
hosts: files dns
|
|
||||||
networks: files dns
|
|
||||||
|
|
||||||
services: db files
|
|
||||||
protocols: db files
|
|
||||||
rpc: db files
|
|
||||||
ethers: db files
|
|
||||||
netmasks: files
|
|
||||||
netgroup: files
|
|
||||||
bootparams: files
|
|
||||||
|
|
||||||
automount: files
|
|
||||||
aliases: files
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
###############################################################################
|
|
||||||
# Default lighttpd.conf for Froxlor.
|
|
||||||
###############################################################################
|
|
||||||
var.basedir = "/var/www"
|
|
||||||
var.logdir = "/var/log/lighttpd"
|
|
||||||
var.statedir = "/var/lib/lighttpd"
|
|
||||||
|
|
||||||
server.modules = (
|
|
||||||
"mod_rewrite",
|
|
||||||
"mod_redirect",
|
|
||||||
"mod_alias",
|
|
||||||
"mod_access",
|
|
||||||
"mod_auth",
|
|
||||||
"mod_fastcgi",
|
|
||||||
"mod_cgi",
|
|
||||||
"mod_accesslog"
|
|
||||||
)
|
|
||||||
|
|
||||||
server.username = "www-data"
|
|
||||||
server.groupname = "www-data"
|
|
||||||
server.document-root = var.basedir
|
|
||||||
server.pid-file = "/var/run/lighttpd.pid"
|
|
||||||
accesslog.filename = var.logdir + "/access.log"
|
|
||||||
server.errorlog = var.logdir + "/error.log"
|
|
||||||
|
|
||||||
server.indexfiles = ("index.php", "index.html",
|
|
||||||
"index.htm", "default.htm")
|
|
||||||
|
|
||||||
server.name = "<SERVERNAME>"
|
|
||||||
server.port = 80
|
|
||||||
server.bind = "<SERVERIP>"
|
|
||||||
url.access-deny = ("~", ".inc")
|
|
||||||
|
|
||||||
fastcgi.server = (
|
|
||||||
".php" => (
|
|
||||||
"localhost" => (
|
|
||||||
"socket" => "/tmp/lighttpd-fcgi-sock-lighttpd",
|
|
||||||
"broken-scriptfilename" => "enable",
|
|
||||||
"bin-path" => "/usr/bin/php5-cgi",
|
|
||||||
"min-procs" => 1,
|
|
||||||
"max-procs" => 1,
|
|
||||||
"max-load-per-proc" => 4,
|
|
||||||
"idle-timeout" => 60,
|
|
||||||
"bin-environment" => (
|
|
||||||
"UID" => "www-data",
|
|
||||||
"GID" => "www-data",
|
|
||||||
"PHP_FCGI_CHILDREN" => "0",
|
|
||||||
"PHP_FCGI_MAX_REQUESTS" => "10000"
|
|
||||||
),
|
|
||||||
"bin-copy-environment" => ( "" )
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
#### external configuration files
|
|
||||||
## mimetype mapping
|
|
||||||
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
#
|
|
||||||
# Froxlor logrotate snipet
|
|
||||||
#
|
|
||||||
<CUSTOMER_LOGS>*.log {
|
|
||||||
missingok
|
|
||||||
weekly
|
|
||||||
rotate 4
|
|
||||||
compress
|
|
||||||
delaycompress
|
|
||||||
notifempty
|
|
||||||
create
|
|
||||||
sharedscripts
|
|
||||||
postrotate
|
|
||||||
<WEBSERVER_RELOAD_CMD> > /dev/null 2>&1 || true
|
|
||||||
endscript
|
|
||||||
}
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
BIND="127.0.0.1:8888"
|
|
||||||
USER="www-data"
|
|
||||||
PHP_FCGI_CHILDREN="15"
|
|
||||||
PHP_FCGI_MAX_REQUESTS="1000"
|
|
||||||
|
|
||||||
PHP_CGI="/usr/bin/php-cgi"
|
|
||||||
PHP_CGI_NAME="$(basename ${PHP_CGI})"
|
|
||||||
PHP_CGI_ARGS="- USER=${USER} PATH=/usr/bin PHP_FCGI_CHILDREN=${PHP_FCGI_CHILDREN} PHP_FCGI_MAX_REQUESTS=${PHP_FCGI_MAX_REQUESTS} ${PHP_CGI} -b ${BIND}"
|
|
||||||
RETVAL="0"
|
|
||||||
|
|
||||||
start() {
|
|
||||||
echo -n "Starting PHP FastCGI: "
|
|
||||||
start-stop-daemon --quiet --start --background --chuid "$USER" --exec /usr/bin/env -- $PHP_CGI_ARGS
|
|
||||||
RETVAL="$?"
|
|
||||||
echo "${PHP_CGI_NAME}."
|
|
||||||
}
|
|
||||||
stop() {
|
|
||||||
echo -n "Stopping PHP FastCGI: "
|
|
||||||
killall -q -w -u ${USER} ${PHP_CGI}
|
|
||||||
RETVAL="$?"
|
|
||||||
echo "${PHP_CGI_NAME}."
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
start)
|
|
||||||
start
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
stop
|
|
||||||
;;
|
|
||||||
restart)
|
|
||||||
stop
|
|
||||||
start
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Usage: php-fastcgi {start|stop|restart}"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
exit "$RETVAL"
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
|
|
||||||
fastcgi_param SERVER_SOFTWARE nginx;
|
|
||||||
fastcgi_param QUERY_STRING $query_string;
|
|
||||||
fastcgi_param REQUEST_METHOD $request_method;
|
|
||||||
fastcgi_param CONTENT_TYPE $content_type;
|
|
||||||
fastcgi_param CONTENT_LENGTH $content_length;
|
|
||||||
fastcgi_param REQUEST_URI $request_uri;
|
|
||||||
fastcgi_param DOCUMENT_URI $document_uri;
|
|
||||||
fastcgi_param DOCUMENT_ROOT $document_root;
|
|
||||||
fastcgi_param SERVER_PROTOCOL $server_protocol;
|
|
||||||
fastcgi_param REMOTE_ADDR $remote_addr;
|
|
||||||
fastcgi_param REMOTE_PORT $remote_port;
|
|
||||||
fastcgi_param SERVER_ADDR $server_addr;
|
|
||||||
fastcgi_param SERVER_PORT $server_port;
|
|
||||||
fastcgi_param SERVER_NAME $server_name;
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
user www-data;
|
|
||||||
worker_processes 4;
|
|
||||||
|
|
||||||
pid /var/run/nginx.pid;
|
|
||||||
|
|
||||||
events {
|
|
||||||
worker_connections 1024;
|
|
||||||
}
|
|
||||||
|
|
||||||
http {
|
|
||||||
include /etc/nginx/mime.types;
|
|
||||||
default_type application/octet-stream;
|
|
||||||
|
|
||||||
access_log /var/log/nginx/access.log;
|
|
||||||
|
|
||||||
sendfile on;
|
|
||||||
tcp_nodelay on;
|
|
||||||
|
|
||||||
keepalive_timeout 65;
|
|
||||||
|
|
||||||
gzip on;
|
|
||||||
|
|
||||||
include /etc/nginx/conf.d/*.conf;
|
|
||||||
include /etc/nginx/sites-enabled/*;
|
|
||||||
}
|
|
||||||
@@ -1,85 +0,0 @@
|
|||||||
## General Postfix configuration
|
|
||||||
# should be the default domain from your provider eg. "server100.provider.tld"
|
|
||||||
mydomain = <SERVERNAME>
|
|
||||||
|
|
||||||
# should be different from $mydomain eg. "mail.$mydomain"
|
|
||||||
myhostname = mail.$mydomain
|
|
||||||
|
|
||||||
mydestination = $myhostname,
|
|
||||||
$mydomain,
|
|
||||||
localhost.$myhostname,
|
|
||||||
localhost.$mydomain,
|
|
||||||
localhost
|
|
||||||
mynetworks = 127.0.0.0/8
|
|
||||||
inet_interfaces = all
|
|
||||||
append_dot_mydomain = no
|
|
||||||
biff = no
|
|
||||||
|
|
||||||
# Postfix performance settings
|
|
||||||
default_destination_concurrency_limit = 20
|
|
||||||
local_destination_concurrency_limit = 2
|
|
||||||
|
|
||||||
# SMTPD Settings
|
|
||||||
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
|
|
||||||
smtpd_helo_required = yes
|
|
||||||
smtpd_recipient_restrictions = permit_mynetworks,
|
|
||||||
permit_sasl_authenticated,
|
|
||||||
reject_unauth_destination,
|
|
||||||
reject_unauth_pipelining,
|
|
||||||
reject_non_fqdn_recipient
|
|
||||||
smtpd_sender_restrictions = permit_mynetworks,
|
|
||||||
reject_sender_login_mismatch,
|
|
||||||
permit_sasl_authenticated,
|
|
||||||
reject_unknown_helo_hostname,
|
|
||||||
reject_unknown_recipient_domain,
|
|
||||||
reject_unknown_sender_domain
|
|
||||||
smtpd_client_restrictions = permit_mynetworks,
|
|
||||||
permit_sasl_authenticated,
|
|
||||||
reject_unknown_client_hostname
|
|
||||||
|
|
||||||
# Postfix 2.10 requires this option. Postfix < 2.10 ignores this.
|
|
||||||
# The option is intentionally left empty.
|
|
||||||
smtpd_relay_restrictions =
|
|
||||||
|
|
||||||
# Maximum size of Message in bytes (50MB)
|
|
||||||
message_size_limit = 52428800
|
|
||||||
|
|
||||||
## SASL Auth Settings
|
|
||||||
smtpd_sasl_auth_enable = yes
|
|
||||||
smtpd_sasl_local_domain = $myhostname
|
|
||||||
broken_sasl_auth_clients = yes
|
|
||||||
|
|
||||||
# Virtual delivery settings
|
|
||||||
virtual_mailbox_base = <VIRTUAL_MAILBOX_BASE>
|
|
||||||
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailbox_maps.cf
|
|
||||||
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_mailbox_domains.cf
|
|
||||||
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_alias_maps.cf
|
|
||||||
smtpd_sender_login_maps = mysql:/etc/postfix/mysql-virtual_sender_permissions.cf
|
|
||||||
virtual_uid_maps = static:<VIRTUAL_UID_MAPS>
|
|
||||||
virtual_gid_maps = static:<VIRTUAL_GID_MAPS>
|
|
||||||
|
|
||||||
# Local delivery settings
|
|
||||||
local_transport = local
|
|
||||||
alias_maps = $alias_database
|
|
||||||
|
|
||||||
# Default Mailbox size, is set to 0 which means unlimited!
|
|
||||||
mailbox_size_limit = 0
|
|
||||||
virtual_mailbox_limit = 0
|
|
||||||
|
|
||||||
### TLS settings
|
|
||||||
###
|
|
||||||
## TLS for outgoing mails from the server to another server
|
|
||||||
#smtp_tls_security_level = may
|
|
||||||
#smtp_tls_note_starttls_offer = yes
|
|
||||||
## TLS for email client
|
|
||||||
#smtpd_tls_security_level = may
|
|
||||||
#smtpd_tls_cert_file = /etc/ssl/server/<SERVERNAME>.pem
|
|
||||||
#smtpd_tls_key_file = $smtpd_tls_cert_file
|
|
||||||
#smtpd_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
|
|
||||||
#smtpd_tls_loglevel = 1
|
|
||||||
#smtpd_tls_received_header = yes
|
|
||||||
|
|
||||||
debugger_command =
|
|
||||||
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
|
|
||||||
ddd $daemon_directory/$process_name $process_id & sleep 5
|
|
||||||
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
user = <SQL_UNPRIVILEGED_USER>
|
|
||||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
|
||||||
dbname = <SQL_DB>
|
|
||||||
hosts = <SQL_HOST>
|
|
||||||
query = SELECT destination FROM mail_virtual WHERE email = '%s' AND TRIM(destination) <> ''
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
user = <SQL_UNPRIVILEGED_USER>
|
|
||||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
|
||||||
dbname = <SQL_DB>
|
|
||||||
hosts = <SQL_HOST>
|
|
||||||
query = SELECT domain FROM panel_domains WHERE domain = '%s' AND isemaildomain = '1'
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
user = <SQL_UNPRIVILEGED_USER>
|
|
||||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
|
||||||
dbname = <SQL_DB>
|
|
||||||
hosts = <SQL_HOST>
|
|
||||||
query = SELECT maildir FROM mail_users WHERE email = '%s'
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
user = <SQL_UNPRIVILEGED_USER>
|
|
||||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
|
||||||
dbname = <SQL_DB>
|
|
||||||
hosts = <SQL_HOST>
|
|
||||||
query = SELECT DISTINCT username FROM mail_users WHERE email in ((SELECT mail_virtual.email_full FROM mail_virtual WHERE mail_virtual.email = '%s' UNION SELECT mail_virtual.destination FROM mail_virtual WHERE mail_virtual.email = '%s'));
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
pwcheck_method: auxprop
|
|
||||||
auxprop_plugin: sql
|
|
||||||
allowanonymouslogin: no
|
|
||||||
allowplaintext: yes
|
|
||||||
mech_list: plain login cram-md5 digest-md5
|
|
||||||
sql_engine: mysql
|
|
||||||
sql_hostnames: <SQL_HOST>
|
|
||||||
sql_user: <SQL_UNPRIVILEGED_USER>
|
|
||||||
sql_passwd: <SQL_UNPRIVILEGED_PASSWORD>
|
|
||||||
sql_database: <SQL_DB>
|
|
||||||
sql_select: SELECT password FROM mail_users WHERE username='%u@%r' OR email='%u@%r'
|
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
## General Postfix configuration
|
|
||||||
# should be the default domain from your provider eg. "server100.provider.tld"
|
|
||||||
mydomain = <SERVERNAME>
|
|
||||||
|
|
||||||
# should be different from $mydomain eg. "mail.$mydomain"
|
|
||||||
myhostname = mail.$mydomain
|
|
||||||
|
|
||||||
mydestination = $myhostname,
|
|
||||||
$mydomain,
|
|
||||||
localhost.$myhostname,
|
|
||||||
localhost.$mydomain,
|
|
||||||
localhost
|
|
||||||
mynetworks = 127.0.0.0/8
|
|
||||||
inet_interfaces = all
|
|
||||||
append_dot_mydomain = no
|
|
||||||
biff = no
|
|
||||||
|
|
||||||
# Postfix performance settings
|
|
||||||
default_destination_concurrency_limit = 20
|
|
||||||
local_destination_concurrency_limit = 2
|
|
||||||
|
|
||||||
# SMTPD Settings
|
|
||||||
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
|
|
||||||
smtpd_helo_required = yes
|
|
||||||
smtpd_recipient_restrictions = permit_mynetworks,
|
|
||||||
permit_sasl_authenticated,
|
|
||||||
reject_unauth_destination,
|
|
||||||
reject_unauth_pipelining,
|
|
||||||
reject_non_fqdn_recipient
|
|
||||||
smtpd_sender_restrictions = permit_mynetworks,
|
|
||||||
reject_sender_login_mismatch,
|
|
||||||
permit_sasl_authenticated,
|
|
||||||
reject_unknown_helo_hostname,
|
|
||||||
reject_unknown_recipient_domain,
|
|
||||||
reject_unknown_sender_domain
|
|
||||||
smtpd_client_restrictions = permit_mynetworks,
|
|
||||||
permit_sasl_authenticated,
|
|
||||||
reject_unknown_client_hostname
|
|
||||||
|
|
||||||
# Postfix 2.10 requires this option. Postfix < 2.10 ignores this.
|
|
||||||
# The option is intentionally left empty.
|
|
||||||
smtpd_relay_restrictions =
|
|
||||||
|
|
||||||
# Maximum size of Message in bytes (50MB)
|
|
||||||
message_size_limit = 52428800
|
|
||||||
|
|
||||||
## SASL Auth Settings
|
|
||||||
smtpd_sasl_auth_enable = yes
|
|
||||||
smtpd_sasl_local_domain = $myhostname
|
|
||||||
broken_sasl_auth_clients = yes
|
|
||||||
## Dovecot Settings for deliver, SASL Auth and virtual transport
|
|
||||||
smtpd_sasl_type = dovecot
|
|
||||||
mailbox_command = /usr/lib/dovecot/deliver
|
|
||||||
virtual_transport = dovecot
|
|
||||||
dovecot_destination_recipient_limit = 1
|
|
||||||
smtpd_sasl_path = private/auth
|
|
||||||
|
|
||||||
# Virtual delivery settings
|
|
||||||
virtual_mailbox_base = <VIRTUAL_MAILBOX_BASE>
|
|
||||||
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailbox_maps.cf
|
|
||||||
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_mailbox_domains.cf
|
|
||||||
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_alias_maps.cf
|
|
||||||
smtpd_sender_login_maps = mysql:/etc/postfix/mysql-virtual_sender_permissions.cf
|
|
||||||
virtual_uid_maps = static:<VIRTUAL_UID_MAPS>
|
|
||||||
virtual_gid_maps = static:<VIRTUAL_GID_MAPS>
|
|
||||||
|
|
||||||
# Local delivery settings
|
|
||||||
local_transport = local
|
|
||||||
alias_maps = $alias_database
|
|
||||||
|
|
||||||
# Default Mailbox size, is set to 0 which means unlimited!
|
|
||||||
mailbox_size_limit = 0
|
|
||||||
virtual_mailbox_limit = 0
|
|
||||||
|
|
||||||
### TLS settings
|
|
||||||
###
|
|
||||||
## TLS for outgoing mails from the server to another server
|
|
||||||
#smtp_tls_security_level = may
|
|
||||||
#smtp_tls_note_starttls_offer = yes
|
|
||||||
## TLS for email client
|
|
||||||
#smtpd_tls_security_level = may
|
|
||||||
#smtpd_tls_cert_file = /etc/ssl/server/<SERVERNAME>.pem
|
|
||||||
#smtpd_tls_key_file = $smtpd_tls_cert_file
|
|
||||||
#smtpd_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
|
|
||||||
#smtpd_tls_loglevel = 1
|
|
||||||
#smtpd_tls_received_header = yes
|
|
||||||
|
|
||||||
debugger_command =
|
|
||||||
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
|
|
||||||
ddd $daemon_directory/$process_name $process_id & sleep 5
|
|
||||||
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
# Add this lines to be able to use dovecot as delivery agent
|
|
||||||
# Dovecot LDA
|
|
||||||
dovecot unix - n n - - pipe
|
|
||||||
flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d ${recipient}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
user = <SQL_UNPRIVILEGED_USER>
|
|
||||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
|
||||||
dbname = <SQL_DB>
|
|
||||||
hosts = <SQL_HOST>
|
|
||||||
query = SELECT destination FROM mail_virtual WHERE email = '%s' AND TRIM(destination) <> ''
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
user = <SQL_UNPRIVILEGED_USER>
|
|
||||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
|
||||||
dbname = <SQL_DB>
|
|
||||||
hosts = <SQL_HOST>
|
|
||||||
query = SELECT domain FROM panel_domains WHERE domain = '%s' AND isemaildomain = '1'
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
user = <SQL_UNPRIVILEGED_USER>
|
|
||||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
|
||||||
dbname = <SQL_DB>
|
|
||||||
hosts = <SQL_HOST>
|
|
||||||
query = SELECT maildir FROM mail_users WHERE email = '%s'
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
user = <SQL_UNPRIVILEGED_USER>
|
|
||||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
|
||||||
dbname = <SQL_DB>
|
|
||||||
hosts = <SQL_HOST>
|
|
||||||
query = SELECT DISTINCT username FROM mail_users WHERE email in ((SELECT mail_virtual.email_full FROM mail_virtual WHERE mail_virtual.email = '%s' UNION SELECT mail_virtual.destination FROM mail_virtual WHERE mail_virtual.email = '%s'));
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
#
|
|
||||||
# ATTENTION - this is not the full postfix-main.cf file
|
|
||||||
#
|
|
||||||
# it only provides additional configuration-entries!
|
|
||||||
#
|
|
||||||
|
|
||||||
#
|
|
||||||
# look for the follow statement
|
|
||||||
#
|
|
||||||
smtpd_recipient_restrictions = permit_mynetworks,
|
|
||||||
permit_sasl_authenticated,
|
|
||||||
reject_unauth_destination,
|
|
||||||
reject_unauth_pipelining,
|
|
||||||
reject_non_fqdn_recipient
|
|
||||||
|
|
||||||
#
|
|
||||||
# and extend it with the following line
|
|
||||||
# so it looks like this
|
|
||||||
#
|
|
||||||
smtpd_recipient_restrictions = permit_mynetworks,
|
|
||||||
permit_sasl_authenticated,
|
|
||||||
reject_unauth_destination,
|
|
||||||
reject_unauth_pipelining,
|
|
||||||
reject_non_fqdn_recipient,
|
|
||||||
check_recipient_mx_access cidr:/etc/postfix/mx_access
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
0.0.0.0/8 REJECT Domain MX in broadcast network
|
|
||||||
10.0.0.0/8 REJECT Domain MX in RFC 1918 private network
|
|
||||||
169.254.0.0/16 REJECT Domain MX in link local network
|
|
||||||
172.16.0.0/12 REJECT Domain MX in RFC 1918 private network
|
|
||||||
192.0.2.0/24 REJECT Domain MX in TEST-NET network
|
|
||||||
192.168.0.0/16 REJECT Domain MX in RFC 1918 private network
|
|
||||||
224.0.0.0/4 REJECT Domain MX in class D multicast network
|
|
||||||
240.0.0.0/5 REJECT Domain MX in class E reserved network
|
|
||||||
248.0.0.0/5 REJECT Domain MX in reserved network
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
allow-axfr-ips=<NAMESERVERS>
|
|
||||||
#local-ipv6=YOUR_IPv6_(if_any)
|
|
||||||
bind-config=<BIND_CONFIG_PATH>named.conf
|
|
||||||
bind-check-interval=180
|
|
||||||
log-dns-details=yes
|
|
||||||
local-address=<SERVERIP>,127.0.0.1
|
|
||||||
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
allow-recursion=127.0.0.1
|
|
||||||
config-dir=/etc/powerdns
|
|
||||||
daemon=yes
|
|
||||||
guardian=yes
|
|
||||||
launch=bind
|
|
||||||
lazy-recursion=yes
|
|
||||||
local-port=53
|
|
||||||
master=yes
|
|
||||||
module-dir=/usr/lib/powerdns
|
|
||||||
setgid=pdns
|
|
||||||
setuid=pdns
|
|
||||||
socket-dir=/var/run
|
|
||||||
version-string=powerdns
|
|
||||||
bind-config=<BIND_CONFIG_PATH>named.conf
|
|
||||||
bind-check-interval=300
|
|
||||||
include=/etc/powerdns/pdns_froxlor.conf
|
|
||||||
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
#
|
|
||||||
# This file is used to manage DSO modules and features.
|
|
||||||
#
|
|
||||||
|
|
||||||
# This is the directory where DSO modules reside
|
|
||||||
|
|
||||||
ModulePath /usr/lib/proftpd
|
|
||||||
|
|
||||||
# Allow only user root to load and unload modules, but allow everyone
|
|
||||||
# to see which modules have been loaded
|
|
||||||
|
|
||||||
ModuleControlsACLs insmod,rmmod allow user root
|
|
||||||
ModuleControlsACLs lsmod allow user *
|
|
||||||
|
|
||||||
LoadModule mod_ctrls_admin.c
|
|
||||||
LoadModule mod_tls.c
|
|
||||||
|
|
||||||
# Install proftpd-mod-mysql or proftpd-mod-pgsql to use this
|
|
||||||
LoadModule mod_sql.c
|
|
||||||
|
|
||||||
# Install proftpd-mod-ldap to use this
|
|
||||||
#LoadModule mod_ldap.c
|
|
||||||
|
|
||||||
#
|
|
||||||
# 'SQLBackend mysql' or 'SQLBackend postgres' directives are required
|
|
||||||
# to have SQL authorization working. You can also comment out the
|
|
||||||
# unused module here, in alternative.
|
|
||||||
#
|
|
||||||
|
|
||||||
# Install proftpd-mod-mysql to use this
|
|
||||||
LoadModule mod_sql_mysql.c
|
|
||||||
|
|
||||||
# Install proftpd-mod-pgsql to use this
|
|
||||||
#LoadModule mod_sql_postgres.c
|
|
||||||
|
|
||||||
#LoadModule mod_radius.c
|
|
||||||
LoadModule mod_quotatab.c
|
|
||||||
LoadModule mod_quotatab_file.c
|
|
||||||
|
|
||||||
# Install proftpd-mod-ldap to use this
|
|
||||||
#LoadModule mod_quotatab_ldap.c
|
|
||||||
|
|
||||||
# Install proftpd-mod-pgsql or proftpd-mod-mysql to use this
|
|
||||||
LoadModule mod_quotatab_sql.c
|
|
||||||
LoadModule mod_quotatab_radius.c
|
|
||||||
LoadModule mod_wrap.c
|
|
||||||
LoadModule mod_rewrite.c
|
|
||||||
LoadModule mod_load.c
|
|
||||||
LoadModule mod_ban.c
|
|
||||||
LoadModule mod_wrap2.c
|
|
||||||
LoadModule mod_wrap2_file.c
|
|
||||||
# Install proftpd-mod-pgsql or proftpd-mod-mysql to use this
|
|
||||||
#LoadModule mod_wrap2_sql.c
|
|
||||||
LoadModule mod_dynmasq.c
|
|
||||||
|
|
||||||
|
|
||||||
# keep this module the last one
|
|
||||||
LoadModule mod_ifsession.c
|
|
||||||
@@ -1,131 +0,0 @@
|
|||||||
#
|
|
||||||
# /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file.
|
|
||||||
# To really apply changes reload proftpd after modifications.
|
|
||||||
#
|
|
||||||
|
|
||||||
# Includes DSO modules
|
|
||||||
Include /etc/proftpd/modules.conf
|
|
||||||
|
|
||||||
# Set off to disable IPv6 support which is annoying on IPv4 only boxes.
|
|
||||||
UseIPv6 on
|
|
||||||
|
|
||||||
ServerName "<SERVERNAME> FTP Server"
|
|
||||||
ServerType standalone
|
|
||||||
DeferWelcome off
|
|
||||||
|
|
||||||
MultilineRFC2228 on
|
|
||||||
DefaultServer on
|
|
||||||
ShowSymlinks on
|
|
||||||
|
|
||||||
TimeoutNoTransfer 600
|
|
||||||
TimeoutStalled 600
|
|
||||||
TimeoutIdle 1200
|
|
||||||
|
|
||||||
DisplayLogin welcome.msg
|
|
||||||
DisplayChdir .message true
|
|
||||||
ListOptions "-l"
|
|
||||||
|
|
||||||
DenyFilter \*.*/
|
|
||||||
|
|
||||||
# Use this to jail all users in their homes
|
|
||||||
# DefaultRoot ~
|
|
||||||
|
|
||||||
# Users require a valid shell listed in /etc/shells to login.
|
|
||||||
# Use this directive to release that constrain.
|
|
||||||
# RequireValidShell off
|
|
||||||
|
|
||||||
# Port 21 is the standard FTP port.
|
|
||||||
Port 21
|
|
||||||
|
|
||||||
# In some cases you have to specify passive ports range to by-pass
|
|
||||||
# firewall limitations. Ephemeral ports can be used for that, but
|
|
||||||
# feel free to use a more narrow range.
|
|
||||||
# PassivePorts 49152 65534
|
|
||||||
|
|
||||||
# If your host was NATted, this option is useful in order to
|
|
||||||
# allow passive tranfers to work. You have to use your public
|
|
||||||
# address and opening the passive ports used on your firewall as well.
|
|
||||||
# MasqueradeAddress 1.2.3.4
|
|
||||||
|
|
||||||
# This is useful for masquerading address with dynamic IPs:
|
|
||||||
# refresh any configured MasqueradeAddress directives every 8 hours
|
|
||||||
<IfModule mod_dynmasq.c>
|
|
||||||
# DynMasqRefresh 28800
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
# To prevent DoS attacks, set the maximum number of child processes
|
|
||||||
# to 30. If you need to allow more than 30 concurrent connections
|
|
||||||
# at once, simply increase this value. Note that this ONLY works
|
|
||||||
# in standalone mode, in inetd mode you should use an inetd server
|
|
||||||
# that allows you to limit maximum number of processes per service
|
|
||||||
# (such as xinetd)
|
|
||||||
MaxInstances 30
|
|
||||||
|
|
||||||
# Set the user and group that the server normally runs at.
|
|
||||||
User proftpd
|
|
||||||
Group nogroup
|
|
||||||
|
|
||||||
# Umask 022 is a good standard umask to prevent new files and dirs
|
|
||||||
# (second parm) from being group and world writable.
|
|
||||||
Umask 022 022
|
|
||||||
# Normally, we want files to be overwriteable.
|
|
||||||
AllowOverwrite on
|
|
||||||
|
|
||||||
# Uncomment this if you are using NIS or LDAP via NSS to retrieve passwords:
|
|
||||||
# PersistentPasswd off
|
|
||||||
|
|
||||||
# This is required to use both PAM-based authentication and local passwords
|
|
||||||
# AuthOrder mod_auth_pam.c* mod_auth_unix.c
|
|
||||||
|
|
||||||
# Be warned: use of this directive impacts CPU average load!
|
|
||||||
# Uncomment this if you like to see progress and transfer rate with ftpwho
|
|
||||||
# in downloads. That is not needed for uploads rates.
|
|
||||||
#
|
|
||||||
# UseSendFile off
|
|
||||||
|
|
||||||
TransferLog /var/log/proftpd/xferlog
|
|
||||||
SystemLog /var/log/proftpd/proftpd.log
|
|
||||||
|
|
||||||
# Allow up- and downloads to be continued
|
|
||||||
AllowRetrieveRestart On
|
|
||||||
AllowStoreRestart On
|
|
||||||
|
|
||||||
<IfModule mod_quotatab.c>
|
|
||||||
QuotaEngine on
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
<IfModule mod_ratio.c>
|
|
||||||
Ratios off
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
|
|
||||||
# Delay engine reduces impact of the so-called Timing Attack described in
|
|
||||||
# http://security.lss.hr/index.php?page=details&ID=LSS-2004-10-02
|
|
||||||
# It is on by default.
|
|
||||||
<IfModule mod_delay.c>
|
|
||||||
DelayEngine off
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
<IfModule mod_ctrls.c>
|
|
||||||
ControlsEngine off
|
|
||||||
ControlsMaxClients 2
|
|
||||||
ControlsLog /var/log/proftpd/controls.log
|
|
||||||
ControlsInterval 5
|
|
||||||
ControlsSocket /var/run/proftpd/proftpd.sock
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
<IfModule mod_ctrls_admin.c>
|
|
||||||
AdminControlsEngine off
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
#
|
|
||||||
# Alternative authentication frameworks
|
|
||||||
#
|
|
||||||
#Include /etc/proftpd/ldap.conf
|
|
||||||
Include /etc/proftpd/sql.conf
|
|
||||||
|
|
||||||
#
|
|
||||||
# This is used for FTPS connections
|
|
||||||
#
|
|
||||||
#Include /etc/proftpd/tls.conf
|
|
||||||
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
<IfModule mod_sql.c>
|
|
||||||
DefaultRoot ~
|
|
||||||
RequireValidShell off
|
|
||||||
AuthOrder mod_sql.c
|
|
||||||
|
|
||||||
SQLBackend mysql
|
|
||||||
SQLEngine on
|
|
||||||
SQLAuthenticate on
|
|
||||||
|
|
||||||
SQLAuthTypes Crypt
|
|
||||||
SQLAuthenticate users* groups*
|
|
||||||
SQLConnectInfo <SQL_DB>@<SQL_HOST> <SQL_UNPRIVILEGED_USER> <SQL_UNPRIVILEGED_PASSWORD>
|
|
||||||
SQLUserInfo ftp_users username password uid gid homedir shell
|
|
||||||
SQLGroupInfo ftp_groups groupname gid members
|
|
||||||
SQLUserWhereClause "login_enabled = 'y'"
|
|
||||||
|
|
||||||
SQLLog PASS login
|
|
||||||
SQLNamedQuery login UPDATE "last_login=now(), login_count=login_count+1 WHERE username='%u'" ftp_users
|
|
||||||
|
|
||||||
SQLLog RETR download
|
|
||||||
SQLNamedQuery download UPDATE "down_count=down_count+1, down_bytes=down_bytes+%b WHERE username='%u'" ftp_users
|
|
||||||
|
|
||||||
SQLLog STOR upload
|
|
||||||
SQLNamedQuery upload UPDATE "up_count=up_count+1, up_bytes=up_bytes+%b WHERE username='%u'" ftp_users
|
|
||||||
|
|
||||||
QuotaEngine on
|
|
||||||
QuotaShowQuotas on
|
|
||||||
QuotaDisplayUnits Mb
|
|
||||||
QuotaLock /var/lock/ftpd.quotatab.lock
|
|
||||||
QuotaLimitTable sql:/get-quota-limit
|
|
||||||
QuotaTallyTable sql:/get-quota-tally/update-quota-tally/insert-quota-tally
|
|
||||||
SQLNamedQuery get-quota-limit SELECT "ftp_users.username AS name, ftp_quotalimits.quota_type, ftp_quotalimits.per_session, ftp_quotalimits.limit_type, panel_customers.diskspace*1024 AS bytes_in_avail, ftp_quotalimits.bytes_out_avail, ftp_quotalimits.bytes_xfer_avail, ftp_quotalimits.files_in_avail, ftp_quotalimits.files_out_avail, ftp_quotalimits.files_xfer_avail FROM ftp_users, ftp_quotalimits, panel_customers WHERE ftp_users.username = '%{0}' AND panel_customers.loginname = SUBSTRING_INDEX('%{0}', 'ftp', 1) AND quota_type ='%{1}'"
|
|
||||||
SQLNamedQuery get-quota-tally SELECT "name, quota_type, bytes_in_used,bytes_out_used, bytes_xfer_used, files_in_used, files_out_used,files_xfer_used FROM ftp_quotatallies WHERE name = '%{0}' AND quota_type = '%{1}'"
|
|
||||||
SQLNamedQuery update-quota-tally UPDATE "bytes_in_used = bytes_in_used + %{0}, bytes_out_used = bytes_out_used + %{1}, bytes_xfer_used = bytes_xfer_used + %{2}, files_in_used = files_in_used + %{3}, files_out_used= files_out_used + %{4}, files_xfer_used = files_xfer_used + %{5} WHERE name= '%{6}' AND quota_type = '%{7}'" ftp_quotatallies
|
|
||||||
SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4},%{5}, %{6}, %{7}" ftp_quotatallies
|
|
||||||
|
|
||||||
</IfModule>
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
STANDALONE_OR_INETD=standalone
|
|
||||||
VIRTUALCHROOT=false
|
|
||||||
UPLOADSCRIPT=
|
|
||||||
UPLOADUID=
|
|
||||||
UPLOADGID=
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
21
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
yes
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user