Compare commits
54 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0cf721bd49 | ||
|
|
f3719d339e | ||
|
|
efc353256d | ||
|
|
f4026c1df5 | ||
|
|
eed7776e86 | ||
|
|
aface6b425 | ||
|
|
b0fb3a31f7 | ||
|
|
b01d37d085 | ||
|
|
72e6e2af24 | ||
|
|
0db11bf0f8 | ||
|
|
07e388c554 | ||
|
|
84c9ac7e82 | ||
|
|
e572c072a9 | ||
|
|
f6f7b2e4be | ||
|
|
5a0973dfa3 | ||
|
|
268f3b0a24 | ||
|
|
348de6da35 | ||
|
|
82958cd8c2 | ||
|
|
264bc50451 | ||
|
|
2ce7e9728f | ||
|
|
8c0bef06c6 | ||
|
|
7a493fad80 | ||
|
|
891835d542 | ||
|
|
1876ed1459 | ||
|
|
711f54662c | ||
|
|
f331dee8a1 | ||
|
|
3f0d94c157 | ||
|
|
f5576606e1 | ||
|
|
34de2c03c4 | ||
|
|
225be93610 | ||
|
|
089b03de38 | ||
|
|
785e8f0938 | ||
|
|
ea24918785 | ||
|
|
daa8e45582 | ||
|
|
aa45bf5f70 | ||
|
|
b64bfaeb92 | ||
|
|
659d673ffa | ||
|
|
65e0962111 | ||
|
|
a5cf1a0ac9 | ||
|
|
465f29531e | ||
|
|
88b0c70d0c | ||
|
|
4c1b30a081 | ||
|
|
afdd94ff9e | ||
|
|
0b8c1441ef | ||
|
|
83b1d85730 | ||
|
|
399664c65a | ||
|
|
2830bb722f | ||
|
|
7e733e60ee | ||
|
|
1f6e3c271b | ||
|
|
9c79654cf4 | ||
|
|
7ea04992e3 | ||
|
|
29a949d3d2 | ||
|
|
36ed2b4dc2 | ||
|
|
9d50eca251 |
@@ -152,6 +152,24 @@ return array(
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'customredirect_enabled' => array(
|
||||
'label' => $lng['serversettings']['customredirect_enabled'],
|
||||
'settinggroup' => 'customredirect',
|
||||
'varname' => 'enabled',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'customredirect_default' => array(
|
||||
'label' => $lng['serversettings']['customredirect_default'],
|
||||
'settinggroup' => 'customredirect',
|
||||
'varname' => 'default',
|
||||
'type' => 'option',
|
||||
'default' => '1',
|
||||
'option_mode' => 'one',
|
||||
'option_options_method' => 'getRedirectCodes',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
),
|
||||
),
|
||||
'ssl' => array(
|
||||
|
||||
@@ -65,7 +65,7 @@ return array(
|
||||
'varname' => 'defaultttl',
|
||||
'type' => 'int',
|
||||
'default' => 604800, /* 1 week */
|
||||
'int_min' => 86400, /* 1 day */
|
||||
'int_min' => 3600, /* 1 hour */
|
||||
'int_max' => 2147483647, /* integer max */
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
|
||||
@@ -93,6 +93,7 @@ if($page == 'admins'
|
||||
$i++;
|
||||
}
|
||||
|
||||
$admincount = $db->num_rows($result);
|
||||
eval("echo \"" . getTemplate("admins/admins") . "\";");
|
||||
}
|
||||
elseif($action == 'su')
|
||||
|
||||
@@ -115,6 +115,7 @@ if($page == 'customers'
|
||||
$i++;
|
||||
}
|
||||
|
||||
$customercount = $db->num_rows($result);
|
||||
eval("echo \"" . getTemplate("customers/customers") . "\";");
|
||||
}
|
||||
elseif($action == 'su'
|
||||
@@ -184,14 +185,30 @@ if($page == 'customers'
|
||||
$db->query("DELETE FROM `" . TABLE_PANEL_TRAFFIC . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
$db->query("DELETE FROM `" . TABLE_MAIL_USERS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
$db->query("DELETE FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
$result = $db->query("SELECT `username` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
while($row = $db->fetch_array($result))
|
||||
$result2 = $db->query("SELECT `username` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
while($row = $db->fetch_array($result2))
|
||||
{
|
||||
$db->query("DELETE FROM `" . TABLE_FTP_QUOTATALLIES . "` WHERE `name`='" . $row['username'] . "'");
|
||||
}
|
||||
$db->query("DELETE FROM `" . TABLE_FTP_GROUPS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
$db->query("DELETE FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
$db->query("DELETE FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
|
||||
// remove everything APS-related, #216
|
||||
$apsresult = $db->query("SELECT `ID` FROM `".TABLE_APS_INSTANCES."` WHERE `CustomerID`='".(int)$id."'");
|
||||
while($apsrow = $db->fetch_array($apsresult))
|
||||
{
|
||||
// remove all package related settings
|
||||
$db->query("DELETE FROM `".TABLE_APS_SETTINGS."` WHERE `InstanceID` = '".(int)$apsrow['ID']."'");
|
||||
// maybe some leftovers in the tasks
|
||||
$db->query("DELETE FROM `".TABLE_APS_TASKS."` WHERE `InstanceID` = '".(int)$apsrow['ID']."'");
|
||||
}
|
||||
// now remove all user instances
|
||||
$db->query("DELETE FROM `".TABLE_APS_INSTANCES."` WHERE `CustomerID`='".(int)$id."'");
|
||||
// eventually some temp-setting-leftovers
|
||||
$db->query("DELETE FROM `".TABLE_APS_TEMP_SETTINGS."` WHERE `CustomerID`='".(int)$id."'");
|
||||
// eof APS-related removings, #216
|
||||
|
||||
$admin_update_query = "UPDATE `" . TABLE_PANEL_ADMINS . "` SET `customers_used` = `customers_used` - 1 ";
|
||||
$admin_update_query.= ", `domains_used` = `domains_used` - 0" . (int)($domains_deleted - $result['subdomains_used']);
|
||||
|
||||
@@ -235,6 +252,11 @@ if($page == 'customers'
|
||||
$admin_update_query.= ", `tickets_used` = `tickets_used` - 0" . (int)$result['tickets'];
|
||||
}
|
||||
|
||||
if($result['aps_packages'] != '-1')
|
||||
{
|
||||
$admin_update_query.= ", `aps_packages` = `aps_packages` - 0" . (int)$result['aps_packages'];
|
||||
}
|
||||
|
||||
if(($result['diskspace'] / 1024) != '-1')
|
||||
{
|
||||
$admin_update_query.= ", `diskspace_used` = `diskspace_used` - 0" . (int)$result['diskspace'];
|
||||
@@ -393,7 +415,7 @@ if($page == 'customers'
|
||||
}
|
||||
|
||||
$createstdsubdomain = intval($_POST['createstdsubdomain']);
|
||||
$password = validate($_POST['customer_password'], 'password');
|
||||
$password = validate($_POST['new_customer_password'], 'password');
|
||||
$password = validatePassword($password);
|
||||
$sendpassword = intval($_POST['sendpassword']);
|
||||
$phpenabled = intval($_POST['phpenabled']);
|
||||
@@ -447,11 +469,11 @@ if($page == 'customers'
|
||||
}
|
||||
else
|
||||
{
|
||||
if(isset($_POST['loginname'])
|
||||
&& $_POST['loginname'] != '')
|
||||
if(isset($_POST['new_loginname'])
|
||||
&& $_POST['new_loginname'] != '')
|
||||
{
|
||||
$accountnumber = intval($settings['system']['lastaccountnumber']);
|
||||
$loginname = validate($_POST['loginname'], 'loginname', '/^[a-z0-9\-_]+$/i');
|
||||
$loginname = validate($_POST['new_loginname'], 'loginname', '/^[a-z0-9\-_]+$/i');
|
||||
|
||||
// Accounts which match systemaccounts are not allowed, filtering them
|
||||
|
||||
@@ -728,7 +750,7 @@ if($page == 'customers'
|
||||
$email = $idna_convert->encode(validate($_POST['email'], 'email'));
|
||||
$customernumber = validate($_POST['customernumber'], 'customer number', '/^[A-Za-z0-9 \-]*$/Di');
|
||||
$def_language = validate($_POST['def_language'], 'default language');
|
||||
$password = validate($_POST['customer_password'], 'new password');
|
||||
$password = validate($_POST['new_customer_password'], 'new password');
|
||||
$diskspace = intval_ressource($_POST['diskspace']);
|
||||
|
||||
if(isset($_POST['diskspace_ul']))
|
||||
|
||||
@@ -130,6 +130,8 @@ if($page == 'domains'
|
||||
$i++;
|
||||
}
|
||||
|
||||
$domainscount = $db->num_rows($result);
|
||||
|
||||
// Display the list
|
||||
|
||||
eval("echo \"" . getTemplate("domains/domains") . "\";");
|
||||
@@ -367,7 +369,14 @@ if($page == 'domains'
|
||||
|
||||
if(!preg_match('/^https?\:\/\//', $documentroot))
|
||||
{
|
||||
$documentroot = makeCorrectDir($documentroot);
|
||||
if(strstr($documentroot, ":") !== FALSE)
|
||||
{
|
||||
standard_error('pathmaynotcontaincolon');
|
||||
}
|
||||
else
|
||||
{
|
||||
$documentroot = makeCorrectDir($documentroot);
|
||||
}
|
||||
}
|
||||
|
||||
$domain_check = $db->query_first("SELECT `id`, `domain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain` = '" . $db->escape(strtolower($domain)) . "'");
|
||||
@@ -378,7 +387,7 @@ if($page == 'domains'
|
||||
if($aliasdomain != 0)
|
||||
{
|
||||
// also check ip/port combination to be the same, #176
|
||||
$aliasdomain_check = $db->query_first('SELECT `d`.id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$customerid . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$customerid . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\' AND `d`.`ipandport` = \''.(int)$ipandport.'\'');
|
||||
$aliasdomain_check = $db->query_first('SELECT `d`.`id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$customerid . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$customerid . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\' AND `d`.`ipandport` = \''.(int)$ipandport.'\'');
|
||||
}
|
||||
|
||||
if($openbasedir != '1')
|
||||
@@ -742,6 +751,12 @@ if($page == 'domains'
|
||||
{
|
||||
$documentroot = $customer['documentroot'];
|
||||
}
|
||||
|
||||
if(!preg_match('/^https?\:\/\//', $documentroot)
|
||||
&& strstr($documentroot, ":") !== FALSE
|
||||
) {
|
||||
standard_error('pathmaynotcontaincolon');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -100,7 +100,7 @@ if($page == 'overview')
|
||||
&& count($latestversion) >= 1)
|
||||
{
|
||||
$_version = $latestversion[0];
|
||||
$_message = $latestversion[1];
|
||||
$_message = isset($latestversion[1]) ? $latestversion[1] : '';
|
||||
$_link = isset($latestversion[2]) ? $latestversion[2] : htmlspecialchars($filename . '?s=' . urlencode($s) . '&page=' . urlencode($page) . '&lookfornewversion=yes');
|
||||
|
||||
$lookfornewversion_lable = $_version;
|
||||
|
||||
@@ -226,6 +226,7 @@ elseif($page == 'domains')
|
||||
$aliasdomain_check = array(
|
||||
'id' => 0
|
||||
);
|
||||
$_doredirect = false;
|
||||
|
||||
if($aliasdomain != 0)
|
||||
{
|
||||
@@ -238,6 +239,7 @@ elseif($page == 'domains')
|
||||
&& validateUrl($idna_convert->encode($_POST['url'])))
|
||||
{
|
||||
$path = $_POST['url'];
|
||||
$_doredirect = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -249,6 +251,14 @@ elseif($page == 'domains')
|
||||
{
|
||||
$path = $userinfo['documentroot'] . '/' . $path;
|
||||
$path = makeCorrectDir($path);
|
||||
if (strstr($path, ":") !== FALSE)
|
||||
{
|
||||
standard_error('pathmaynotcontaincolon');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$_doredirect = true;
|
||||
}
|
||||
|
||||
if(isset($_POST['openbasedir_path'])
|
||||
@@ -326,6 +336,13 @@ elseif($page == 'domains')
|
||||
`ssl_redirect` = '" . $ssl_redirect . "',
|
||||
`phpsettingid` = '" . $phpsid_result['phpsettingid'] . "'");
|
||||
|
||||
if($_doredirect)
|
||||
{
|
||||
$did = $db->insert_id();
|
||||
$redirect = isset($_POST['redirectcode']) ? (int)$_POST['redirectcode'] : $settings['customredirect']['default'];
|
||||
addRedirectToDomain($did, $redirect);
|
||||
}
|
||||
|
||||
$result = $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used`=`subdomains_used`+1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "added subdomain '" . $completedomain . "'");
|
||||
inserttask('1');
|
||||
@@ -351,6 +368,16 @@ elseif($page == 'domains')
|
||||
$aliasdomains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id']);
|
||||
}
|
||||
|
||||
if($settings['customredirect']['enabled'] == '1')
|
||||
{
|
||||
$redirectcode = '';
|
||||
$codes = getRedirectCodesArray();
|
||||
foreach($codes as $rc)
|
||||
{
|
||||
$redirectcode .= makeoption($rc['code'], $rc['id'], $settings['customredirect']['default']);
|
||||
}
|
||||
}
|
||||
|
||||
$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
|
||||
$openbasedir = makeoption($lng['domain']['docroot'], 0, NULL, true) . makeoption($lng['domain']['homedir'], 1, NULL, true);
|
||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
|
||||
@@ -364,6 +391,7 @@ elseif($page == 'domains')
|
||||
$result = $db->query_first("SELECT `d`.`id`, `d`.`customerid`, `d`.`domain`, `d`.`documentroot`, `d`.`isemaildomain`, `d`.`iswildcarddomain`, `d`.`parentdomainid`, `d`.`ssl_redirect`, `d`.`aliasdomain`, `d`.`openbasedir_path`, `d`.`ipandport`, `pd`.`subcanemaildomain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_DOMAINS . "` `pd` WHERE `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `d`.`id`='" . (int)$id . "' AND ((`d`.`parentdomainid`!='0' AND `pd`.`id`=`d`.`parentdomainid`) OR (`d`.`parentdomainid`='0' AND `pd`.`id`=`d`.`id`)) AND `d`.`caneditdomain`='1'");
|
||||
$alias_check = $db->query_first('SELECT COUNT(`id`) AS count FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `aliasdomain`=\'' . (int)$result['id'] . '\'');
|
||||
$alias_check = $alias_check['count'];
|
||||
$_doredirect = false;
|
||||
|
||||
if(isset($result['customerid'])
|
||||
&& $result['customerid'] == $userinfo['customerid'])
|
||||
@@ -376,6 +404,7 @@ elseif($page == 'domains')
|
||||
&& validateUrl($idna_convert->encode($_POST['url'])))
|
||||
{
|
||||
$path = $_POST['url'];
|
||||
$_doredirect = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -387,6 +416,14 @@ elseif($page == 'domains')
|
||||
{
|
||||
$path = $userinfo['documentroot'] . '/' . $path;
|
||||
$path = makeCorrectDir($path);
|
||||
if (strstr($path, ":") !== FALSE)
|
||||
{
|
||||
standard_error('pathmaynotcontaincolon');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$_doredirect = true;
|
||||
}
|
||||
|
||||
$aliasdomain = intval($_POST['alias']);
|
||||
@@ -461,6 +498,12 @@ elseif($page == 'domains')
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, "automatically deleted mail-table entries for '" . $idna_convert->decode($result['domain']) . "'");
|
||||
}
|
||||
|
||||
if($_doredirect)
|
||||
{
|
||||
$redirect = isset($_POST['redirectcode']) ? (int)$_POST['redirectcode'] : false;
|
||||
updateRedirectOfDomain($id, $redirect);
|
||||
}
|
||||
|
||||
if($path != $result['documentroot']
|
||||
|| $isemaildomain != $result['isemaildomain']
|
||||
|| $iswildcarddomain != $result['iswildcarddomain']
|
||||
@@ -502,6 +545,17 @@ elseif($page == 'domains')
|
||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], $result['documentroot']);
|
||||
}
|
||||
|
||||
if($settings['customredirect']['enabled'] == '1')
|
||||
{
|
||||
$def_code = getDomainRedirectId($id);
|
||||
$redirectcode = '';
|
||||
$codes = getRedirectCodesArray();
|
||||
foreach($codes as $rc)
|
||||
{
|
||||
$redirectcode .= makeoption($rc['code'], $rc['id'], $def_code);
|
||||
}
|
||||
}
|
||||
|
||||
$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
|
||||
$iswildcarddomain = makeyesno('iswildcarddomain', '1', '0', $result['iswildcarddomain']);
|
||||
$isemaildomain = makeyesno('isemaildomain', '1', '0', $result['isemaildomain']);
|
||||
|
||||
@@ -139,8 +139,10 @@ elseif($page == 'emails')
|
||||
}
|
||||
}
|
||||
|
||||
$emaildomains_count = $db->query_first("SELECT COUNT(`id`) AS `count` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . $userinfo['customerid'] . "' AND `isemaildomain`='1' ORDER BY `domain` ASC");
|
||||
$emaildomains_count = $db->query_first("SELECT COUNT(`id`) AS `count` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `isemaildomain`='1' ORDER BY `domain` ASC");
|
||||
$emaildomains_count = $emaildomains_count['count'];
|
||||
|
||||
$emailscount = $db->num_rows($result);
|
||||
eval("echo \"" . getTemplate("email/emails") . "\";");
|
||||
}
|
||||
elseif($action == 'delete'
|
||||
|
||||
@@ -142,6 +142,12 @@ elseif($page == 'accounts')
|
||||
$password = validate($_POST['ftp_password'], 'password');
|
||||
$password = validatePassword($password);
|
||||
|
||||
$sendinfomail = intval($_POST['sendinfomail']);
|
||||
if($sendinfomail != 1)
|
||||
{
|
||||
$sendinfomail = 0;
|
||||
}
|
||||
|
||||
if($settings['customer']['ftpatdomain'] == '1')
|
||||
{
|
||||
$ftpusername = validate($_POST['ftp_username'], 'username', '/^[a-zA-Z0-9][a-zA-Z0-9\-_]+\$?$/');
|
||||
@@ -191,6 +197,41 @@ elseif($page == 'accounts')
|
||||
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "added ftp-account '" . $username . " (" . $path . ")'");
|
||||
inserttask(5);
|
||||
|
||||
if($sendinfomail == 1)
|
||||
{
|
||||
$replace_arr = array(
|
||||
'CUST_NAME' => getCorrectUserSalutation($userinfo),
|
||||
'USR_NAME' => $username,
|
||||
'USR_PASS' => $password,
|
||||
'USR_PATH' => makeCorrectDir(substr($path, strlen($userinfo['documentroot'])))
|
||||
);
|
||||
|
||||
$mail_body = replace_variables($lng['customer']['ftp_add']['infomail_body']['main'], $replace_arr);
|
||||
|
||||
$_mailerror = false;
|
||||
try {
|
||||
$mail->Subject = $lng['customer']['ftp_add']['infomail_subject'];
|
||||
$mail->AltBody = $mail_body;
|
||||
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
||||
$mail->AddAddress($userinfo['email'], getCorrectUserSalutation($userinfo));
|
||||
$mail->Send();
|
||||
} catch(phpmailerException $e) {
|
||||
$mailerr_msg = $e->errorMessage();
|
||||
$_mailerror = true;
|
||||
} catch (Exception $e) {
|
||||
$mailerr_msg = $e->getMessage();
|
||||
$_mailerror = true;
|
||||
}
|
||||
|
||||
if ($_mailerror) {
|
||||
$log->logAction(USR_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||
standard_error('errorsendingmail', $userinfo['email']);
|
||||
}
|
||||
|
||||
$mail->ClearAddresses();
|
||||
}
|
||||
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
}
|
||||
@@ -210,6 +251,8 @@ elseif($page == 'accounts')
|
||||
}
|
||||
}
|
||||
|
||||
$sendinfomail = makeyesno('sendinfomail', '1', '0', '0');
|
||||
|
||||
eval("echo \"" . getTemplate("ftp/accounts_add") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -451,7 +451,7 @@ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) V
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (18, 'system', 'vmail_homedir', '/var/customers/mail/');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (19, 'system', 'bindconf_directory', '/etc/bind/');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (20, 'system', 'bindreload_command', '/etc/init.d/bind9 reload');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (22, 'panel', 'version', '0.9.6');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (22, 'panel', 'version', '0.9.8');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (23, 'system', 'hostname', 'SERVERNAME');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (24, 'login', 'maxloginattempts', '3');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (25, 'login', 'deactivatetime', '900');
|
||||
@@ -568,6 +568,8 @@ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) V
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (137, 'ticket', 'default_priority', '2');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (138, 'system', 'mod_fcgid_defaultini', '1');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (139, 'system', 'ftpserver', 'proftpd');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (140, 'customredirect', 'enabled', '1');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (141, 'customredirect', 'default', '1');
|
||||
|
||||
|
||||
# --------------------------------------------------------
|
||||
@@ -828,6 +830,7 @@ CREATE TABLE IF NOT EXISTS `panel_syslog` (
|
||||
# Table structure for table `mail_autoresponder`
|
||||
#
|
||||
|
||||
DROP TABLE IF EXISTS `mail_autoresponder`;
|
||||
CREATE TABLE `mail_autoresponder` (
|
||||
`email` varchar(255) NOT NULL default '',
|
||||
`message` text NOT NULL,
|
||||
@@ -852,6 +855,7 @@ CREATE TABLE `mail_autoresponder` (
|
||||
# Table structure for table `panel_phpconfigs`
|
||||
#
|
||||
|
||||
DROP TABLE IF EXISTS `panel_phpconfigs`;
|
||||
CREATE TABLE `panel_phpconfigs` (
|
||||
`id` int(11) unsigned NOT NULL auto_increment,
|
||||
`description` varchar(50) NOT NULL,
|
||||
@@ -875,6 +879,7 @@ INSERT INTO `panel_phpconfigs` (`id`, `description`, `binary`, `file_extensions`
|
||||
# Tabellenstruktur fuer Tabelle `aps_instances`
|
||||
#
|
||||
|
||||
DROP TABLE IF EXISTS `aps_instances`;
|
||||
CREATE TABLE IF NOT EXISTS `aps_instances` (
|
||||
`ID` int(4) NOT NULL auto_increment,
|
||||
`CustomerID` int(4) NOT NULL,
|
||||
@@ -889,6 +894,7 @@ CREATE TABLE IF NOT EXISTS `aps_instances` (
|
||||
# Tabellenstruktur fuer Tabelle `aps_packages`
|
||||
#
|
||||
|
||||
DROP TABLE IF EXISTS `aps_packages`;
|
||||
CREATE TABLE IF NOT EXISTS `aps_packages` (
|
||||
`ID` int(4) NOT NULL auto_increment,
|
||||
`Path` varchar(500) NOT NULL,
|
||||
@@ -905,6 +911,7 @@ CREATE TABLE IF NOT EXISTS `aps_packages` (
|
||||
# Tabellenstruktur fuer Tabelle `aps_settings`
|
||||
#
|
||||
|
||||
DROP TABLE IF EXISTS `aps_settings`;
|
||||
CREATE TABLE IF NOT EXISTS `aps_settings` (
|
||||
`ID` int(4) NOT NULL auto_increment,
|
||||
`InstanceID` int(4) NOT NULL,
|
||||
@@ -919,6 +926,7 @@ CREATE TABLE IF NOT EXISTS `aps_settings` (
|
||||
# Tabellenstruktur fuer Tabelle `aps_tasks`
|
||||
#
|
||||
|
||||
DROP TABLE IF EXISTS `aps_tasks`;
|
||||
CREATE TABLE IF NOT EXISTS `aps_tasks` (
|
||||
`ID` int(4) NOT NULL auto_increment,
|
||||
`InstanceID` int(4) NOT NULL,
|
||||
@@ -932,6 +940,7 @@ CREATE TABLE IF NOT EXISTS `aps_tasks` (
|
||||
# Tabellenstruktur fuer Tabelle `aps_temp_settings`
|
||||
#
|
||||
|
||||
DROP TABLE IF EXISTS `aps_temp_settings`;
|
||||
CREATE TABLE IF NOT EXISTS `aps_temp_settings` (
|
||||
`ID` int(4) NOT NULL auto_increment,
|
||||
`PackageID` int(4) NOT NULL,
|
||||
@@ -947,6 +956,7 @@ CREATE TABLE IF NOT EXISTS `aps_temp_settings` (
|
||||
# Tabellenstruktur fuer Tabelle `cronjobs_run`
|
||||
#
|
||||
|
||||
DROP TABLE IF EXISTS `cronjobs_run`;
|
||||
CREATE TABLE IF NOT EXISTS `cronjobs_run` (
|
||||
`id` bigint(20) NOT NULL auto_increment,
|
||||
`module` varchar(250) NOT NULL,
|
||||
@@ -977,6 +987,7 @@ INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`,
|
||||
# Tabellenstruktur fuer Tabelle `ftp_quotalimits`
|
||||
#
|
||||
|
||||
DROP TABLE IF EXISTS `ftp_quotalimits`;
|
||||
CREATE TABLE IF NOT EXISTS `ftp_quotalimits` (
|
||||
`name` varchar(30) default NULL,
|
||||
`quota_type` enum('user','group','class','all') NOT NULL default 'user',
|
||||
@@ -1001,7 +1012,8 @@ INSERT INTO `ftp_quotalimits` (`name`, `quota_type`, `per_session`, `limit_type`
|
||||
#
|
||||
# Tabellenstruktur fuer Tabelle `ftp_quotatallies`
|
||||
#
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `ftp_quotatallies`;
|
||||
CREATE TABLE IF NOT EXISTS `ftp_quotatallies` (
|
||||
`name` varchar(30) NOT NULL,
|
||||
`quota_type` enum('user','group','class','all') NOT NULL,
|
||||
@@ -1012,3 +1024,41 @@ CREATE TABLE IF NOT EXISTS `ftp_quotatallies` (
|
||||
`files_out_used` int(10) unsigned NOT NULL,
|
||||
`files_xfer_used` int(10) unsigned NOT NULL
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
# --------------------------------------------------------
|
||||
|
||||
#
|
||||
# Tabellenstruktur fuer Tabelle `redirect_codes`
|
||||
#
|
||||
|
||||
DROP TABLE IF EXISTS `redirect_codes`;
|
||||
CREATE TABLE IF NOT EXISTS `redirect_codes` (
|
||||
`id` int(5) NOT NULL auto_increment,
|
||||
`code` varchar(3) NOT NULL,
|
||||
`desc` varchar(200) NOT NULL,
|
||||
`enabled` tinyint(1) DEFAULT '1',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
#
|
||||
# Dumping data for table `redirect_codes`
|
||||
#
|
||||
|
||||
INSERT INTO `redirect_codes` (`id`, `code`, `desc`, `enabled`) VALUES (1, '---', 'rc_default', 1);
|
||||
INSERT INTO `redirect_codes` (`id`, `code`, `desc`, `enabled`) VALUES (2, '301', 'rc_movedperm', 1);
|
||||
INSERT INTO `redirect_codes` (`id`, `code`, `desc`, `enabled`) VALUES (3, '302', 'rc_found', 1);
|
||||
INSERT INTO `redirect_codes` (`id`, `code`, `desc`, `enabled`) VALUES (4, '303', 'rc_seeother', 1);
|
||||
INSERT INTO `redirect_codes` (`id`, `code`, `desc`, `enabled`) VALUES (5, '307', 'rc_tempred', 1);
|
||||
|
||||
# --------------------------------------------------------
|
||||
|
||||
#
|
||||
# Tabellenstruktur fuer Tabelle `domain_redirect_codes`
|
||||
#
|
||||
|
||||
DROP TABLE IF EXISTS `domain_redirect_codes`;
|
||||
CREATE TABLE IF NOT EXISTS `domain_redirect_codes` (
|
||||
`rid` int(5) NOT NULL,
|
||||
`did` int(11) unsigned NOT NULL,
|
||||
UNIQUE KEY `rc` (`rid`, `did`)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
@@ -637,6 +637,7 @@ if(isset($_POST['installstep'])
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/froxlor-htpasswd/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_htpasswddir'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/init.d/lighttpd reload' WHERE `settinggroup` = 'system' AND `varname` = 'apachereload_command'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/lighttpd.pem' WHERE `settinggroup` = 'system' AND `varname` = 'ssl_cert_file'");
|
||||
$ssettings = '';
|
||||
}
|
||||
|
||||
// insert the lastcronrun to be the installation date
|
||||
|
||||
@@ -29,8 +29,8 @@ if(isFroxlorVersion('0.9-r0'))
|
||||
if(isset($settings['system']['dbversion']) && (int)$settings['system']['dbversion'] < 2)
|
||||
{
|
||||
$db->query("ALTER TABLE `panel_ipsandports` CHANGE `ssl_cert` `ssl_cert_file` VARCHAR( 255 ) NOT NULL,
|
||||
ADD `ssl_key_file` VARCHAR( 255 ) NOT NULL,
|
||||
ADD `ssl_ca_file` VARCHAR( 255 ) NOT NULL,
|
||||
ADD `ssl_key_file` VARCHAR( 255 ) NOT NULL,
|
||||
ADD `ssl_ca_file` VARCHAR( 255 ) NOT NULL,
|
||||
ADD `default_vhostconf_domain` TEXT NOT NULL;");
|
||||
|
||||
$db->query("INSERT INTO `panel_settings` SET `settinggroup` = 'system', `varname` = 'ssl_key_file', `value` = '';");
|
||||
@@ -177,9 +177,9 @@ if(isFroxlorVersion('0.9-r0'))
|
||||
$db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "`
|
||||
MODIFY `traffic` BIGINT(30),
|
||||
MODIFY `traffic_used` BIGINT(30)");
|
||||
|
||||
|
||||
lastStepStatus(0);
|
||||
|
||||
|
||||
updateToVersion('0.9-r1');
|
||||
}
|
||||
|
||||
@@ -187,11 +187,11 @@ if(isFroxlorVersion('0.9-r1'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9-r1 to 0.9-r2", false);
|
||||
showUpdateStep("Updating settings table");
|
||||
|
||||
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('spf', 'use_spf', '0');");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('spf', 'spf_entry', '@ IN TXT \"v=spf1 a mx -all\"');");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `varname` = 'froxlor_graphic' WHERE `varname` = 'syscp_graphic'");
|
||||
if(isset($settings['admin']['syscp_graphic'])
|
||||
if(isset($settings['admin']['syscp_graphic'])
|
||||
&& $settings['admin']['syscp_graphic'] != ''
|
||||
){
|
||||
$settings['admin']['froxlor_graphic'] = $settings['admin']['syscp_graphic'];
|
||||
@@ -200,7 +200,7 @@ if(isFroxlorVersion('0.9-r1'))
|
||||
{
|
||||
$settings['admin']['froxlor_graphic'] = 'images/header.gif';
|
||||
}
|
||||
|
||||
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9-r2');
|
||||
@@ -209,7 +209,7 @@ if(isFroxlorVersion('0.9-r1'))
|
||||
if(isFroxlorVersion('0.9-r2'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9-r2 to 0.9-r3", false);
|
||||
showUpdateStep("Updating tables");
|
||||
showUpdateStep("Updating tables");
|
||||
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'debug_cron', '0');");
|
||||
$db->query("ALTER TABLE `" . TABLE_MAIL_AUTORESPONDER . "` ADD `date_from` int(15) NOT NULL default '-1' AFTER `enabled`");
|
||||
@@ -223,11 +223,11 @@ if(isFroxlorVersion('0.9-r2'))
|
||||
if(isFroxlorVersion('0.9-r3'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9-r3 to 0.9-r4", false);
|
||||
showUpdateStep("Creating new table 'cronjobs_run'");
|
||||
showUpdateStep("Creating new table 'cronjobs_run'");
|
||||
|
||||
$db->query("CREATE TABLE IF NOT EXISTS `cronjobs_run` (
|
||||
`id` bigint(20) NOT NULL auto_increment,
|
||||
`module` varchar(250) NOT NULL,
|
||||
`module` varchar(250) NOT NULL,
|
||||
`cronfile` varchar(250) NOT NULL,
|
||||
`lastrun` int(15) NOT NULL DEFAULT '0',
|
||||
`interval` varchar(100) NOT NULL DEFAULT '5 MINUTE',
|
||||
@@ -238,28 +238,28 @@ if(isFroxlorVersion('0.9-r3'))
|
||||
|
||||
lastStepStatus(0);
|
||||
showUpdateStep("Inserting new values into table");
|
||||
|
||||
|
||||
// checking for active ticket-module
|
||||
$ticket_active = 0;
|
||||
if((int)$settings['ticket']['enabled'] == 1)
|
||||
{
|
||||
$ticket_active = 1;
|
||||
}
|
||||
|
||||
|
||||
// checking for active aps-module
|
||||
$aps_active = 0;
|
||||
if((int)$settings['aps']['aps_active'] == 1)
|
||||
{
|
||||
$aps_active = 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// checking for active autoresponder-module
|
||||
$ar_active = 0;
|
||||
if((int)$settings['autoresponder']['autoresponder_active'] == 1)
|
||||
{
|
||||
$ar_active = 1;
|
||||
}
|
||||
|
||||
|
||||
$db->query("INSERT INTO `cronjobs_run` (`module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES ('froxlor/core', 'cron_tasks.php', '5 MINUTE', '1', 'cron_tasks');");
|
||||
$db->query("INSERT INTO `cronjobs_run` (`module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES ('froxlor/core', 'cron_legacy.php', '5 MINUTE', '1', 'cron_legacy');");
|
||||
$db->query("INSERT INTO `cronjobs_run` (`module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES ('froxlor/aps', 'cron_apsinstaller.php', '5 MINUTE', ".$aps_active.", 'cron_apsinstaller');");
|
||||
@@ -268,29 +268,30 @@ if(isFroxlorVersion('0.9-r3'))
|
||||
$db->query("INSERT INTO `cronjobs_run` (`module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES ('froxlor/core', 'cron_traffic.php', '1 DAY', '1', 'cron_traffic');");
|
||||
$db->query("INSERT INTO `cronjobs_run` (`module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES ('froxlor/ticket', 'cron_used_tickets_reset.php', '1 MONTH', '".$ticket_active."', 'cron_ticketsreset');");
|
||||
$db->query("INSERT INTO `cronjobs_run` (`module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES ('froxlor/ticket', 'cron_ticketarchive.php', '1 MONTH', '".$ticket_active."', 'cron_ticketarchive');");
|
||||
|
||||
|
||||
lastStepStatus(0);
|
||||
showUpdateStep("Updating old settings values");
|
||||
|
||||
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = 'Froxlor Support' WHERE `settinggroup`='ticket' AND `varname`='noreply_name' AND `value`='SysCP Support'");
|
||||
|
||||
lastStepStatus(0);
|
||||
lastStepStatus(0);
|
||||
updateToVersion('0.9-r4');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9-r4'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9-r4 to 0.9 final", false);
|
||||
showUpdateStep("Updating from 0.9-r4 to 0.9 final");
|
||||
lastStepStatus(0);
|
||||
updateToVersion('0.9');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9 to 0.9.1", false);
|
||||
|
||||
|
||||
showUpdateStep("Updating settings values");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = 'images/header.gif' WHERE `varname` = 'froxlor_graphic' AND `value` = 'images/header.png'");
|
||||
|
||||
|
||||
lastStepStatus(0);
|
||||
updateToVersion('0.9.1');
|
||||
}
|
||||
@@ -298,13 +299,13 @@ if(isFroxlorVersion('0.9'))
|
||||
if(isFroxlorVersion('0.9.1'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.1 to 0.9.2", false);
|
||||
|
||||
|
||||
showUpdateStep("Checking whether last-system-guid is sane");
|
||||
|
||||
|
||||
$result = $db->query_first("SELECT MAX(`guid`) as `latestguid` FROM `".TABLE_PANEL_CUSTOMERS."`");
|
||||
|
||||
if (isset($result['latestguid'])
|
||||
&& (int)$result['latestguid'] > 0
|
||||
|
||||
if (isset($result['latestguid'])
|
||||
&& (int)$result['latestguid'] > 0
|
||||
&& $result['latestguid'] != $settings['system']['lastguid']
|
||||
) {
|
||||
checkLastGuid();
|
||||
@@ -326,7 +327,7 @@ if(isFroxlorVersion('0.9.3'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.3 to 0.9.3-svn1", false);
|
||||
|
||||
showUpdateStep("Updating tables");
|
||||
showUpdateStep("Updating tables");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'password_min_length', '0');");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'store_index_file_subs', '1');");
|
||||
lastStepStatus(0);
|
||||
@@ -338,7 +339,7 @@ if(isFroxlorVersion('0.9.3-svn1'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.3-svn1 to 0.9.3-svn2", false);
|
||||
|
||||
showUpdateStep("Updating tables");
|
||||
showUpdateStep("Updating tables");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'adminmail_defname', 'Froxlor Administrator');");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'adminmail_return', '');");
|
||||
lastStepStatus(0);
|
||||
@@ -403,7 +404,7 @@ if(isFroxlorVersion('0.9.3-svn5'))
|
||||
if(isFroxlorVersion('0.9.4'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.4 to 0.9.4-svn1", false);
|
||||
|
||||
|
||||
/**
|
||||
* some users might still have the setting in their database
|
||||
* because we already had this back in older versions.
|
||||
@@ -414,13 +415,14 @@ if(isFroxlorVersion('0.9.4'))
|
||||
) {
|
||||
showUpdateStep("Updating awstats path setting");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/usr/bin/' WHERE `settinggroup` = 'system' AND `varname` = 'awstats_path';");
|
||||
lastStepStatus(0);
|
||||
}
|
||||
else
|
||||
elseif(!isset($settings['system']['awstats_path']))
|
||||
{
|
||||
showUpdateStep("Adding new awstats path setting");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'awstats_path', '/usr/bin/');");
|
||||
lastStepStatus(0);
|
||||
}
|
||||
lastStepStatus(0);
|
||||
|
||||
if(isset($settings['system']['awstats_domain_file'])
|
||||
&& $settings['system']['awstats_domain_file'] != ''
|
||||
@@ -441,15 +443,15 @@ if(isFroxlorVersion('0.9.4'))
|
||||
if(isFroxlorVersion('0.9.4-svn1'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.4-svn1 to 0.9.4-svn2", false);
|
||||
|
||||
|
||||
$update_domains = isset($_POST['update_domainwildcardentry']) ? intval($_POST['update_domainwildcardentry']) : 0;
|
||||
|
||||
if($update_domains != 1)
|
||||
|
||||
if($update_domains != 1)
|
||||
{
|
||||
$update_domains = 0;
|
||||
}
|
||||
|
||||
if($update_domains == 1)
|
||||
|
||||
if($update_domains == 1)
|
||||
{
|
||||
showUpdateStep("Updating domains with iswildcarddomain=yes");
|
||||
$query = "SELECT `d`.`id` FROM `".TABLE_PANEL_DOMAINS."` `d`, `".TABLE_PANEL_CUSTOMERS."` `c` ";
|
||||
@@ -466,7 +468,7 @@ if(isFroxlorVersion('0.9.4-svn1'))
|
||||
showUpdateStep("Won't update domains with iswildcarddomain=yes as requested");
|
||||
lastStepStatus(1);
|
||||
}
|
||||
|
||||
|
||||
showUpdateStep("Updating database table definition for panel_domains");
|
||||
$db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` MODIFY `iswildcarddomain` tinyint(1) NOT NULL default '1';");
|
||||
lastStepStatus(0);
|
||||
@@ -484,7 +486,7 @@ if(isFroxlorVersion('0.9.4-svn2'))
|
||||
if(isFroxlorVersion('0.9.5'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.5 to 0.9.6-svn1", false);
|
||||
|
||||
|
||||
showUpdateStep("Adding time-to-live configuration setting");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'defaultttl', '604800');");
|
||||
lastStepStatus(0);
|
||||
@@ -499,7 +501,7 @@ if(isFroxlorVersion('0.9.5'))
|
||||
if(isFroxlorVersion('0.9.6-svn1'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.6-svn1 to 0.9.6-svn2", false);
|
||||
|
||||
|
||||
$update_adminmail = isset($_POST['update_adminmail']) ? validate($_POST['update_adminmail'], 'update_adminmail') : false;
|
||||
$do_update = true;
|
||||
|
||||
@@ -517,7 +519,7 @@ if(isFroxlorVersion('0.9.6-svn1'))
|
||||
lastStepStatus(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($do_update)
|
||||
{
|
||||
updateToVersion('0.9.6-svn2');
|
||||
@@ -527,7 +529,7 @@ if(isFroxlorVersion('0.9.6-svn1'))
|
||||
if(isFroxlorVersion('0.9.6-svn2'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.6-svn2 to 0.9.6-svn3", false);
|
||||
|
||||
|
||||
$update_deferr_enable = isset($_POST['update_deferr_enable']) ? true : false;
|
||||
|
||||
$err500 = false;
|
||||
@@ -539,35 +541,35 @@ if(isFroxlorVersion('0.9.6-svn2'))
|
||||
if($update_deferr_enable == true)
|
||||
{
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'enabled', '1');");
|
||||
|
||||
|
||||
if(isset($_POST['update_deferr_500'])
|
||||
&& trim($_POST['update_deferr_500']) != ''
|
||||
) {
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err500', '".$db->escape($_POST['update_deferr_500'])."');");
|
||||
$err500 = true;
|
||||
}
|
||||
|
||||
|
||||
if(isset($_POST['update_deferr_401'])
|
||||
&& trim($_POST['update_deferr_401']) != ''
|
||||
) {
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err500', '".$db->escape($_POST['update_deferr_401'])."');");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err401', '".$db->escape($_POST['update_deferr_401'])."');");
|
||||
$err401 = true;
|
||||
}
|
||||
|
||||
|
||||
if(isset($_POST['update_deferr_403'])
|
||||
&& trim($_POST['update_deferr_403']) != ''
|
||||
) {
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err500', '".$db->escape($_POST['update_deferr_403'])."');");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err403', '".$db->escape($_POST['update_deferr_403'])."');");
|
||||
$err403 = true;
|
||||
}
|
||||
|
||||
|
||||
if(isset($_POST['update_deferr_404'])
|
||||
&& trim($_POST['update_deferr_404']) != ''
|
||||
) {
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err500', '".$db->escape($_POST['update_deferr_404'])."');");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err404', '".$db->escape($_POST['update_deferr_404'])."');");
|
||||
$err404 = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!$update_deferr_enable) {
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'enabled', '0');");
|
||||
@@ -582,7 +584,7 @@ if(isFroxlorVersion('0.9.6-svn2'))
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err404', '');");
|
||||
}
|
||||
if(!$err500) {
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err500', '');");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err500', '');");
|
||||
}
|
||||
|
||||
lastStepStatus(0);
|
||||
@@ -593,7 +595,7 @@ if(isFroxlorVersion('0.9.6-svn2'))
|
||||
if(isFroxlorVersion('0.9.6-svn3'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.6-svn3 to 0.9.6-svn4", false);
|
||||
|
||||
|
||||
$update_deftic_priority = isset($_POST['update_deftic_priority']) ? intval($_POST['update_deftic_priority']) : 2;
|
||||
|
||||
showUpdateStep("Setting default support-ticket priority");
|
||||
@@ -606,7 +608,7 @@ if(isFroxlorVersion('0.9.6-svn3'))
|
||||
if(isFroxlorVersion('0.9.6-svn4'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.6-svn4 to 0.9.6-svn5", false);
|
||||
|
||||
|
||||
$update_defsys_phpconfig = isset($_POST['update_defsys_phpconfig']) ? intval($_POST['update_defsys_phpconfig']) : 1;
|
||||
|
||||
if($update_defsys_phpconfig != 1) {
|
||||
@@ -633,7 +635,7 @@ if(isFroxlorVersion('0.9.6-svn5'))
|
||||
$db->query("INSERT INTO `panel_settings` SET `settinggroup` = 'system', `varname` = 'ftpserver', `value` = '".$db->escape($update_defsys_ftpserver)."';");
|
||||
|
||||
// add proftpd quota
|
||||
$db->query("CREATE TABLE`ftp_quotalimits` (`name` varchar(30) default NULL, `quota_type` enum('user','group','class','all') NOT NULL default 'user', `per_session` enum('false','true') NOT NULL default 'false', `limit_type` enum('soft','hard') NOT NULL default 'hard', `bytes_in_avail` float NOT NULL, `bytes_out_avail` float NOT NULL, `bytes_xfer_avail` float NOT NULL, `files_in_avail` int(10) unsigned NOT NULL, `files_out_avail` int(10) unsigned NOT NULL, `files_xfer_avail` int(10) unsigned NOT NULL) ENGINE=MyISAM;");
|
||||
$db->query("CREATE TABLE `ftp_quotalimits` (`name` varchar(30) default NULL, `quota_type` enum('user','group','class','all') NOT NULL default 'user', `per_session` enum('false','true') NOT NULL default 'false', `limit_type` enum('soft','hard') NOT NULL default 'hard', `bytes_in_avail` float NOT NULL, `bytes_out_avail` float NOT NULL, `bytes_xfer_avail` float NOT NULL, `files_in_avail` int(10) unsigned NOT NULL, `files_out_avail` int(10) unsigned NOT NULL, `files_xfer_avail` int(10) unsigned NOT NULL) ENGINE=MyISAM;");
|
||||
|
||||
$db->query("INSERT INTO `ftp_quotalimits` (`name`, `quota_type`, `per_session`, `limit_type`, `bytes_in_avail`, `bytes_out_avail`, `bytes_xfer_avail`, `files_in_avail`, `files_out_avail`, `files_xfer_avail`) VALUES ('froxlor', 'user', 'false', 'hard', 0, 0, 0, 0, 0, 0);");
|
||||
|
||||
@@ -661,4 +663,116 @@ if(isFroxlorVersion('0.9.6-svn6'))
|
||||
updateToVersion('0.9.6');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.6'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.6 to 0.9.7-svn1", false);
|
||||
|
||||
$update_customredirect_enable = isset($_POST['update_customredirect_enable']) ? 1 : 0;
|
||||
$update_customredirect_default = isset($_POST['update_customredirect_default']) ? (int)$_POST['update_customredirect_default'] : 1;
|
||||
|
||||
showUpdateStep("Adding new tables to database");
|
||||
$db->query("CREATE TABLE IF NOT EXISTS `redirect_codes` (
|
||||
`id` int(5) NOT NULL auto_increment,
|
||||
`code` varchar(3) NOT NULL,
|
||||
`enabled` tinyint(1) DEFAULT '1',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM;");
|
||||
|
||||
$db->query("CREATE TABLE IF NOT EXISTS `domain_redirect_codes` (
|
||||
`rid` int(5) NOT NULL,
|
||||
`did` int(11) unsigned NOT NULL,
|
||||
UNIQUE KEY `rc` (`rid`, `did`)
|
||||
) ENGINE=MyISAM;");
|
||||
lastStepStatus(0);
|
||||
|
||||
showUpdateStep("Filling new tables with default data");
|
||||
$db->query("INSERT INTO `redirect_codes` (`id`, `code`, `enabled`) VALUES (1, '---', 1);");
|
||||
$db->query("INSERT INTO `redirect_codes` (`id`, `code`, `enabled`) VALUES (2, '301', 1);");
|
||||
$db->query("INSERT INTO `redirect_codes` (`id`, `code`, `enabled`) VALUES (3, '302', 1);");
|
||||
$db->query("INSERT INTO `redirect_codes` (`id`, `code`, `enabled`) VALUES (4, '303', 1);");
|
||||
$db->query("INSERT INTO `redirect_codes` (`id`, `code`, `enabled`) VALUES (5, '307', 1);");
|
||||
lastStepStatus(0);
|
||||
|
||||
showUpdateStep("Updating domains");
|
||||
$res = $db->query("SELECT `id` FROM `".TABLE_PANEL_DOMAINS."` ORDER BY `id` ASC");
|
||||
$updated_domains = 0;
|
||||
while($d = $db->fetch_array($res))
|
||||
{
|
||||
$db->query("INSERT INTO `domain_redirect_codes` (`rid`, `did`) VALUES ('".(int)$update_customredirect_default."', '".(int)$d['id']."');");
|
||||
$updated_domains++;
|
||||
}
|
||||
lastStepStatus(0, 'Updated '.$updated_domains.' domain(s)');
|
||||
|
||||
showUpdateStep("Adding new settings");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('customredirect', 'enabled', '".(int)$update_customredirect_enable."');");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('customredirect', 'default', '".(int)$update_customredirect_default."');");
|
||||
lastStepStatus(0);
|
||||
|
||||
// need to fix default-error-copy-and-paste-shizzle
|
||||
showUpdateStep("Checking if anything is ok with the default-error-handler");
|
||||
if(!isset($settings['defaultwebsrverrhandler']['err404']))
|
||||
{
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err404', '');");
|
||||
}
|
||||
if(!isset($settings['defaultwebsrverrhandler']['err403']))
|
||||
{
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err403', '');");
|
||||
}
|
||||
if(!isset($settings['defaultwebsrverrhandler']['err401']))
|
||||
{
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err401', '');");
|
||||
}
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.7-svn1');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.7-svn1'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.7-svn1 to 0.9.7-svn2", false);
|
||||
|
||||
showUpdateStep("Updating open_basedir due to security - issue");
|
||||
$result = $db->query("SELECT `id` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `documentroot` LIKE '%:%' AND `documentroot` NOT LIKE 'http://%' AND `openbasedir_path` = '0' AND `openbasedir` = '1'");
|
||||
while($row = $db->fetch_array($result))
|
||||
{
|
||||
$db->query("UPDATE `".TABLE_PANEL_DOMAINS."` SET `openbasedir_path` = '1' WHERE `id` = " . $row['id']);
|
||||
}
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.7-svn2');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.7-svn2'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.7-svn2 to 0.9.7-svn3", false);
|
||||
|
||||
showUpdateStep("Updating database tables");
|
||||
$db->query("ALTER TABLE `redirect_codes` ADD `desc` varchar(200) NOT NULL AFTER `code`;");
|
||||
lastStepStatus(0);
|
||||
|
||||
showUpdateStep("Updating field-values");
|
||||
$db->query("UPDATE `redirect_codes` SET `desc` = 'rc_default' WHERE `code` = '---';");
|
||||
$db->query("UPDATE `redirect_codes` SET `desc` = 'rc_movedperm' WHERE `code` = '301';");
|
||||
$db->query("UPDATE `redirect_codes` SET `desc` = 'rc_found' WHERE `code` = '302';");
|
||||
$db->query("UPDATE `redirect_codes` SET `desc` = 'rc_seeother' WHERE `code` = '303';");
|
||||
$db->query("UPDATE `redirect_codes` SET `desc` = 'rc_tempred' WHERE `code` = '307';");
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.7-svn3');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.7-svn3'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.7-svn3 to 0.9.7 final");
|
||||
lastStepStatus(0);
|
||||
updateToVersion('0.9.7');
|
||||
}
|
||||
|
||||
if(isFroxlorVersion('0.9.7'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.7 to 0.9.8 final");
|
||||
lastStepStatus(0);
|
||||
updateToVersion('0.9.8');
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -33,7 +33,7 @@ function getPreConfig($current_version)
|
||||
include_once makeCorrectFile(dirname(__FILE__).'/preconfig/0.9/preconfig_0.9.inc.php');
|
||||
parseAndOutputPreconfig($has_preconfig, $return, $current_version);
|
||||
|
||||
$return .= '<br /><br />'.makecheckbox('update_changesagreed', '<strong>I have read the update notifications and I am aware of the changes made to my system.</strong>', '1', true, '0', true);
|
||||
$return .= '<br /><br />'.makecheckbox('update_changesagreed', '<strong>I have read the update notifications above and I am aware of the changes made to my system.</strong>', '1', true, '0', true);
|
||||
$return .= '</div>';
|
||||
$return .= '<input type="hidden" name="update_preconfig" value="1" />';
|
||||
|
||||
@@ -55,7 +55,7 @@ function versionInUpdate($current_version, $version_to_check)
|
||||
// to compare it correctly
|
||||
if($pos_a === false && $pos_b !== false)
|
||||
{
|
||||
$current_version.= '-svn0';
|
||||
$current_version.= '-svn9999';
|
||||
}
|
||||
|
||||
return version_compare($current_version, $version_to_check, '<');
|
||||
|
||||
@@ -17,16 +17,16 @@
|
||||
|
||||
/**
|
||||
* checks if the new-version has some updating to do
|
||||
*
|
||||
*
|
||||
* @param boolean $has_preconfig pointer to check if any preconfig has to be output
|
||||
* @param string $return pointer to output string
|
||||
* @param string $current_version current froxlor version
|
||||
*
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
|
||||
{
|
||||
global $settings, $lng;
|
||||
global $settings, $lng, $db;
|
||||
|
||||
if(versionInUpdate($current_version, '0.9.4-svn2'))
|
||||
{
|
||||
@@ -54,7 +54,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
|
||||
if(versionInUpdate($current_version, '0.9.6-svn3'))
|
||||
{
|
||||
$has_preconfig = true;
|
||||
$description = 'You now have the possibility to define default error-documents for your webserver which replace the default webserver error-messages.';
|
||||
$description = 'You now have the possibility to define default error-documents for your webserver which replace the default webserver error-messages.';
|
||||
$question = '<strong>Do you want to enable default error-documents?:</strong> ';
|
||||
$question .= makeyesno('update_deferr_enable', '1', '0', '0').'<br /><br />';
|
||||
if($settings['system']['webserver'] == 'apache2')
|
||||
@@ -79,12 +79,12 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
|
||||
$question .= $priorities.'</select>';
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
|
||||
|
||||
if(versionInUpdate($current_version, '0.9.6-svn5'))
|
||||
{
|
||||
$has_preconfig = true;
|
||||
$description = 'If you have more than one PHP-configurations defined in Froxlor you can know set a default one which will be used for every domain.';
|
||||
$question = '<strong>Select default PHP-configuration:</strong> ';
|
||||
$description = 'If you have more than one PHP configurations defined in Froxlor you can now set a default one which will be used for every domain.';
|
||||
$question = '<strong>Select default PHP configuration:</strong> ';
|
||||
$question .= '<select name="update_defsys_phpconfig">';
|
||||
$configs_array = getPhpConfigs();
|
||||
$configs = '';
|
||||
@@ -95,7 +95,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
|
||||
$question .= $configs.'</select>';
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
|
||||
|
||||
if(versionInUpdate($current_version, '0.9.6-svn6'))
|
||||
{
|
||||
$has_preconfig = true;
|
||||
@@ -107,4 +107,46 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
|
||||
$question .= '</select>';
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
|
||||
if(versionInUpdate($current_version, '0.9.7-svn1'))
|
||||
{
|
||||
$has_preconfig = true;
|
||||
$description = 'You can now choose whether customers can select the http-redirect code and which of them acts as default.';
|
||||
$question = '<strong>Allow customer chosen redirects?:</strong> ';
|
||||
$question.= makeyesno('update_customredirect_enable', '1', '0', '1').'<br /><br />';
|
||||
$question.= '<strong>Select default redirect code (default: empty):</strong> ';
|
||||
$question.= '<select name="update_customredirect_default">';
|
||||
$redirects = makeoption('--- ('.$lng['redirect_desc']['rc_default'].')', 1, '1');
|
||||
$redirects.= makeoption('301 ('.$lng['redirect_desc']['rc_movedperm'].')', 2, '1');
|
||||
$redirects.= makeoption('302 ('.$lng['redirect_desc']['rc_found'].')', 3, '1');
|
||||
$redirects.= makeoption('303 ('.$lng['redirect_desc']['rc_seeother'].')', 4, '1');
|
||||
$redirects.= makeoption('307 ('.$lng['redirect_desc']['rc_tempred'].')', 5, '1');
|
||||
$question .= $redirects.'</select>';
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
|
||||
if(versionInUpdate($current_version, '0.9.7-svn2'))
|
||||
{
|
||||
$result = $db->query("SELECT `domain` FROM " . TABLE_PANEL_DOMAINS . " WHERE `documentroot` LIKE '%:%' AND `documentroot` NOT LIKE 'http://%' AND `openbasedir_path` = '0' AND `openbasedir` = '1'");
|
||||
$wrongOpenBasedirDomain = array();
|
||||
while($row = $db->fetch_array($result))
|
||||
{
|
||||
$wrongOpenBasedirDomain[] = $row['domain'];
|
||||
}
|
||||
|
||||
if(count($wrongOpenBasedirDomain) > 0)
|
||||
{
|
||||
$has_preconfig = true;
|
||||
$description = 'Resetting the open_basedir to customer - root';
|
||||
$question = '<strong>Due to a security - issue regarding open_basedir, Froxlor will set the open_basedir for the following domains to the customers root instead of the chosen documentroot:</strong><br /> ';
|
||||
$question.= '<ul>';
|
||||
$idna_convert = new idna_convert_wrapper();
|
||||
foreach($wrongOpenBasedirDomain as $domain)
|
||||
{
|
||||
$question.= '<li>' . $idna_convert->decode($domain) . '</li>';
|
||||
}
|
||||
$question.= '</ul>';
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,18 @@
|
||||
|
||||
$updatelog = FroxlorLogger::getInstanceOf(array('loginname' => 'updater'), $db, $settings);
|
||||
|
||||
$updatelogfile = validateUpdateLogFile(makeCorrectFile(dirname(__FILE__).'/update.log'));
|
||||
$filelog = FileLogger::getInstanceOf(array('loginname' => 'updater'), $settings);
|
||||
$filelog->setLogFile($updatelogfile);
|
||||
|
||||
// if first writing does not work we'll stop, tell the user to fix it
|
||||
// and then let him try again.
|
||||
try {
|
||||
$filelog->logAction(ADM_ACTION, LOG_WARNING, '-------------- START LOG --------------');
|
||||
} catch(Exception $e) {
|
||||
standard_error('exception', $e->getMessage());
|
||||
}
|
||||
|
||||
/*
|
||||
* since froxlor, we have to check if there's still someone
|
||||
* out there using syscp and needs to upgrade
|
||||
@@ -90,6 +102,8 @@ if(!isFroxlor())
|
||||
if(isFroxlor())
|
||||
{
|
||||
include_once (makeCorrectFile(dirname(__FILE__).'/updates/froxlor/0.9/update_0.9.inc.php'));
|
||||
$filelog->logAction(ADM_ACTION, LOG_WARNING, '--------------- END LOG ---------------');
|
||||
unset($filelog);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -169,7 +169,7 @@ class FileLogger extends AbstractLogger
|
||||
}
|
||||
}
|
||||
|
||||
private function setLogFile($filename = null)
|
||||
public function setLogFile($filename = null)
|
||||
{
|
||||
if($filename != null
|
||||
&& $filename != ''
|
||||
|
||||
@@ -273,10 +273,8 @@ return Array(
|
||||
'commands' => Array(
|
||||
'apt-get install awstats',
|
||||
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl /usr/lib/cgi-bin/',
|
||||
'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
||||
'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^DirData/# DirData/\''.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
||||
),
|
||||
),
|
||||
'libnss' => Array(
|
||||
|
||||
@@ -58,7 +58,7 @@ return Array(
|
||||
'cd /usr/ports/dns/powerdns',
|
||||
'make config',
|
||||
'make install',
|
||||
'echo "add pdns_enable=\"YES\"" >> /etc/rc.conf',
|
||||
'echo "pdns_enable=\"YES\"" >> /etc/rc.conf',
|
||||
),
|
||||
'files' => Array(
|
||||
'usr_local_etc_pdns_pdns.conf' => '/usr/local/etc/pdns/pdns.conf'
|
||||
@@ -155,7 +155,7 @@ return Array(
|
||||
'set ManageSieve support (optional)',
|
||||
'set MySQL support ',
|
||||
'make install',
|
||||
'echo "add dovecot_enable=\"YES\"" >> /etc/rc.conf'
|
||||
'echo "dovecot_enable=\"YES\"" >> /etc/rc.conf'
|
||||
),
|
||||
'files' => Array(
|
||||
'usr_local_etc_dovecot.conf' => '/usr/local/etc/dovecot.conf',
|
||||
@@ -198,10 +198,32 @@ return Array(
|
||||
'commands' => Array(
|
||||
'cd /usr/ports/www/awstats/',
|
||||
'make install clean',
|
||||
'cp /usr/local/www/awstats/cgi-bin/awstats.model.conf '.makeCorrectDir($settings['system']['awstats_conf'])
|
||||
'cp /usr/local/www/awstats/cgi-bin/awstats.model.conf '.makeCorrectDir($settings['system']['awstats_conf']),
|
||||
'sed -i.bak \'s/^LogFile/# LogFile/\''.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf'),
|
||||
'sed -i.bak \'s/^LogType/# LogType/\''.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf'),
|
||||
'sed -i.bak \'s/^LogFormat/# LogFormat/\''.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf'),
|
||||
'sed -i.bak \'s/^LogSeparator/# LogSeparator/\''.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf'),
|
||||
'sed -i.bak \'s/^SiteDomain/# SiteDomain/\''.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf'),
|
||||
'sed -i.bak \'s/^DirData/# DirData/\''.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf')
|
||||
)
|
||||
),
|
||||
'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(
|
||||
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
||||
'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'
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -320,10 +320,8 @@ milter_default_action = accept" >> /etc/postfix/main.cf'
|
||||
'label' => 'Awstats',
|
||||
'commands' => Array(
|
||||
'emerge awstats',
|
||||
'awstats_configure.pl'
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
||||
'awstats_configure.pl',
|
||||
'sed -i.bak \'s/^DirData/# DirData/\''.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
||||
),
|
||||
),
|
||||
'libnss' => Array(
|
||||
|
||||
@@ -298,10 +298,8 @@ return Array(
|
||||
'commands' => Array(
|
||||
'apt-get install awstats',
|
||||
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl /usr/lib/cgi-bin/',
|
||||
'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
||||
'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^DirData/# DirData/\''.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
||||
),
|
||||
),
|
||||
'libnss' => Array(
|
||||
|
||||
@@ -306,10 +306,8 @@ return Array(
|
||||
'commands' => Array(
|
||||
'apt-get install awstats',
|
||||
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl /usr/lib/cgi-bin/',
|
||||
'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
||||
'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^DirData/# DirData/\''.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
||||
),
|
||||
),
|
||||
'libnss' => Array(
|
||||
|
||||
335
lib/configfiles/lucid.inc.php
Normal file
335
lib/configfiles/lucid.inc.php
Normal file
@@ -0,0 +1,335 @@
|
||||
<?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
|
||||
* @version $Id: lenny.inc.php 860 2010-04-30 16:38:02Z Dessa $
|
||||
*/
|
||||
|
||||
return Array(
|
||||
'ubuntu_lucid' => Array(
|
||||
'label' => 'Ubuntu 10.04 (Lucid)',
|
||||
'services' => Array(
|
||||
'http' => Array(
|
||||
'label' => $lng['admin']['configfiles']['http'],
|
||||
'daemons' => Array(
|
||||
'apache2' => Array(
|
||||
'label' => 'Apache 2',
|
||||
'commands' => Array(
|
||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
|
||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'a2dismod userdir'
|
||||
),
|
||||
'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['system']['documentroot_prefix'],
|
||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
|
||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir']
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/lighttpd restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'dns' => Array(
|
||||
'label' => $lng['admin']['configfiles']['dns'],
|
||||
'daemons' => Array(
|
||||
'bind' => Array(
|
||||
'label' => 'Bind9',
|
||||
'commands' => Array(
|
||||
'apt-get install bind9',
|
||||
'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/bind/named.conf',
|
||||
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chown root:bind ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chmod 0644 ' . $settings['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(
|
||||
'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',
|
||||
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
|
||||
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
|
||||
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
||||
'chown -R vmail:vmail ' . $settings['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/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: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 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_sasl_smtpd.conf' => '/etc/postfix/sasl/smtpd.conf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/postfix restart',
|
||||
'newaliases'
|
||||
)
|
||||
),
|
||||
'postfix_dovecot' => Array(
|
||||
'label' => 'Postfix/Dovecot',
|
||||
'commands' => Array(
|
||||
'apt-get install postfix postfix-mysql',
|
||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
||||
'mkdir -p /var/spool/postfix/var/run/mysqld',
|
||||
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
|
||||
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
|
||||
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
||||
'chown -R vmail:vmail ' . $settings['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',
|
||||
'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',
|
||||
'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',
|
||||
),
|
||||
'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'
|
||||
),
|
||||
'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' => 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'
|
||||
),
|
||||
'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' => 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'
|
||||
),
|
||||
'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(
|
||||
'/etc/init.d/cron restart'
|
||||
)
|
||||
),
|
||||
'xinetd' => Array(
|
||||
'label' => 'xinet.d (froxlor updates in realtime)',
|
||||
'commands' => Array(
|
||||
'apt-get install xinetd'
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_xinet.d_froxlor' => '/etc/xinetd.d/froxlor'
|
||||
),
|
||||
'restart' => Array(
|
||||
'/etc/init.d/xinetd restart'
|
||||
)
|
||||
),
|
||||
'awstats' => Array(
|
||||
'label' => 'Awstats',
|
||||
'commands' => Array(
|
||||
'apt-get install awstats',
|
||||
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl /usr/lib/cgi-bin/',
|
||||
'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^DirData/# DirData/\''.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
||||
),
|
||||
),
|
||||
'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'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -154,10 +154,8 @@ return Array(
|
||||
'label' => 'Awstats',
|
||||
'commands' => Array(
|
||||
'awstats_configure.pl',
|
||||
makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
||||
),
|
||||
'files' => Array(
|
||||
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
||||
makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^DirData/# DirData/\''.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -45,6 +45,6 @@ else
|
||||
|
||||
$cfgPath = 'lib/configfiles/';
|
||||
$configfiles = Array();
|
||||
$configfiles = array_merge(include $cfgPath . 'lenny.inc.php', include $cfgPath . 'etch.inc.php', include $cfgPath . 'hardy.inc.php', include $cfgPath . 'gentoo.inc.php', include $cfgPath . 'suse10.inc.php', include $cfgPath . 'freebsd.inc.php');
|
||||
$configfiles = array_merge(include $cfgPath . 'lenny.inc.php', include $cfgPath . 'etch.inc.php', include $cfgPath . 'hardy.inc.php', include $cfgPath . 'lucid.inc.php', include $cfgPath . 'gentoo.inc.php', include $cfgPath . 'suse10.inc.php', include $cfgPath . 'freebsd.inc.php');
|
||||
|
||||
?>
|
||||
@@ -20,10 +20,12 @@
|
||||
/**
|
||||
* Returns a valid html tag for the choosen $fieldType for pathes
|
||||
*
|
||||
* @param string path The path to start searching in
|
||||
* @param integer uid The uid which must match the found directories
|
||||
* @param integer gid The gid which must match the found direcotries
|
||||
* @param string fieldType Either "Manual" or "Dropdown"
|
||||
* @param string path The path to start searching in
|
||||
* @param integer uid The uid which must match the found directories
|
||||
* @param integer gid The gid which must match the found direcotries
|
||||
* @param string fieldType Either "Manual" or "Dropdown"
|
||||
* @param string value the value for the input-field
|
||||
*
|
||||
* @return string The html tag for the choosen $fieldType
|
||||
*
|
||||
* @author Martin Burchert <martin.burchert@syscp.de>
|
||||
@@ -42,6 +44,12 @@ function makePathfield($path, $uid, $gid, $fieldType, $value = '')
|
||||
}
|
||||
elseif($fieldType == 'Dropdown')
|
||||
{
|
||||
// path is given without starting slash
|
||||
// but dirList holds the paths with starting slash
|
||||
// so we just add one here to get the correct
|
||||
// default path selected, #225
|
||||
$value = '/'.$value;
|
||||
|
||||
$dirList = findDirs($path, $uid, $gid);
|
||||
|
||||
natcasesort($dirList);
|
||||
@@ -64,6 +72,9 @@ function makePathfield($path, $uid, $gid, $fieldType, $value = '')
|
||||
}
|
||||
else
|
||||
{
|
||||
// remove starting slash we added
|
||||
// for the Dropdown, #225
|
||||
$value = substr($value, 1);
|
||||
$field = $lng['panel']['toomanydirs'];
|
||||
$field.= '<input type="text" name="path" value="' . htmlspecialchars($value) . '" />';
|
||||
}
|
||||
|
||||
@@ -229,6 +229,59 @@ function getOutstandingTasks()
|
||||
}
|
||||
}
|
||||
|
||||
$query2 = "SELECT DISTINCT `Task` FROM `".TABLE_APS_TASKS."` ORDER BY `Task` ASC";
|
||||
$result2 = $db->query($query2);
|
||||
|
||||
while($row2 = $db->fetch_array($result2))
|
||||
{
|
||||
/*
|
||||
* install
|
||||
*/
|
||||
if($row2['Task'] == '1')
|
||||
{
|
||||
$task_desc = $lng['tasks']['aps_task_install'];
|
||||
}
|
||||
/*
|
||||
* remove
|
||||
*/
|
||||
elseif($row2['Task'] == '2')
|
||||
{
|
||||
$task_desc = $lng['tasks']['aps_task_remove'];
|
||||
}
|
||||
/*
|
||||
* reconfigure
|
||||
*/
|
||||
elseif($row2['Task'] == '3')
|
||||
{
|
||||
$task_desc = $lng['tasks']['aps_task_reconfigure'];
|
||||
}
|
||||
/*
|
||||
* upgrade
|
||||
*/
|
||||
elseif($row2['Task'] == '4')
|
||||
{
|
||||
$task_desc = $lng['tasks']['aps_task_upgrade'];
|
||||
}
|
||||
/*
|
||||
* system update
|
||||
*/
|
||||
elseif($row2['Task'] == '5')
|
||||
{
|
||||
$task_desc = $lng['tasks']['aps_task_sysupdate'];
|
||||
}
|
||||
/*
|
||||
* system download
|
||||
*/
|
||||
elseif($row2['Task'] == '6')
|
||||
{
|
||||
$task_desc = $lng['tasks']['aps_task_sysdownload'];
|
||||
}
|
||||
|
||||
if($task_desc != '') {
|
||||
$tasks .= '<li>'.$task_desc.'</li>';
|
||||
}
|
||||
}
|
||||
|
||||
if(trim($tasks) == '') {
|
||||
$outstanding_tasks .= '<li>'.$lng['tasks']['noneoutstanding'].'</li>';
|
||||
} else {
|
||||
|
||||
@@ -115,7 +115,7 @@ function hasUpdates($to_check = null)
|
||||
*/
|
||||
function showUpdateStep($task = null, $needs_status = true)
|
||||
{
|
||||
global $updatelog;
|
||||
global $updatelog, $filelog;
|
||||
|
||||
// output
|
||||
echo $task;
|
||||
@@ -126,6 +126,7 @@ function showUpdateStep($task = null, $needs_status = true)
|
||||
}
|
||||
|
||||
$updatelog->logAction(ADM_ACTION, LOG_WARNING, $task);
|
||||
$filelog->logAction(ADM_ACTION, LOG_WARNING, $task);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -140,7 +141,7 @@ function showUpdateStep($task = null, $needs_status = true)
|
||||
*/
|
||||
function lastStepStatus($status = -1, $message = '')
|
||||
{
|
||||
global $updatelog;
|
||||
global $updatelog, $filelog;
|
||||
|
||||
switch($status)
|
||||
{
|
||||
@@ -164,8 +165,35 @@ function lastStepStatus($status = -1, $message = '')
|
||||
// output
|
||||
echo "<span style=\"margin-left: 5em; font-weight: bold; color: #".$status_color."\">".$status_sign."</span><br />";
|
||||
|
||||
if($status == -1)
|
||||
if($status == -1 || $status == 2)
|
||||
{
|
||||
$updatelog->logAction(ADM_ACTION, LOG_WARNING, 'Attention - last update task failed!!!');
|
||||
$filelog->logAction(ADM_ACTION, LOG_WARNING, 'Attention - last update task failed!!!');
|
||||
}
|
||||
elseif($status == 0 || $status == 1)
|
||||
{
|
||||
$filelog->logAction(ADM_ACTION, LOG_WARNING, 'Success');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* validate if full path to update.log is sane
|
||||
* if not, the update.log is created in /tmp/
|
||||
*
|
||||
* @param string $filename the file name to validate
|
||||
*
|
||||
* @return string the full path with filename (can differ if not writeable => /tmp)
|
||||
*/
|
||||
function validateUpdateLogFile($filename)
|
||||
{
|
||||
if(!is_dir($filename))
|
||||
{
|
||||
$fh = @fopen($filename, 'a');
|
||||
if($fh)
|
||||
{
|
||||
fclose($fh);
|
||||
return $filename;
|
||||
}
|
||||
}
|
||||
return '/tmp/froxlor_update.log';
|
||||
}
|
||||
|
||||
163
lib/functions/output/function.RedirectCode.php
Normal file
163
lib/functions/output/function.RedirectCode.php
Normal file
@@ -0,0 +1,163 @@
|
||||
<?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 Functions
|
||||
* @version $$
|
||||
*/
|
||||
|
||||
/**
|
||||
* return an array of all enabled redirect-codes
|
||||
*
|
||||
* @return array array of enabled redirect-codes
|
||||
*/
|
||||
function getRedirectCodesArray()
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql = "SELECT * FROM `".TABLE_PANEL_REDIRECTCODES."` WHERE `enabled` = '1' ORDER BY `id` ASC";
|
||||
$result = $db->query($sql);
|
||||
|
||||
$codes = array();
|
||||
while($rc = $db->fetch_array($result))
|
||||
{
|
||||
$codes[] = $rc;
|
||||
}
|
||||
|
||||
return $codes;
|
||||
}
|
||||
|
||||
/**
|
||||
* return an array of all enabled redirect-codes
|
||||
* for the settings form
|
||||
*
|
||||
* @return array array of enabled redirect-codes
|
||||
*/
|
||||
function getRedirectCodes()
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql = "SELECT * FROM `".TABLE_PANEL_REDIRECTCODES."` WHERE `enabled` = '1' ORDER BY `id` ASC";
|
||||
$result = $db->query($sql);
|
||||
|
||||
$codes = array();
|
||||
while($rc = $db->fetch_array($result))
|
||||
{
|
||||
$codes[$rc['id']] = $rc['code']. ' ('.$lng['redirect_desc'][$rc['desc']].')';
|
||||
}
|
||||
|
||||
return $codes;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the redirect-code for a given
|
||||
* domain-id
|
||||
*
|
||||
* @param integer $domainid id of the domain
|
||||
*
|
||||
* @return string redirect-code
|
||||
*/
|
||||
function getDomainRedirectCode($domainid = 0)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$code = '';
|
||||
if($domainid > 0)
|
||||
{
|
||||
$sql = "SELECT `r`.`code` as `redirect`
|
||||
FROM `".TABLE_PANEL_REDIRECTCODES."` `r`, `".TABLE_PANEL_DOMAINREDIRECTS."` `rc`
|
||||
WHERE `r`.`id` = `rc`.`rid` and `rc`.`did` = '".(int)$domainid."'";
|
||||
|
||||
$result = $db->query_first($sql);
|
||||
|
||||
if(is_array($result)
|
||||
&& isset($result['redirect'])
|
||||
) {
|
||||
$code = ($result['redirect'] == '---') ? '' : $result['redirect'];
|
||||
}
|
||||
}
|
||||
return $code;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the redirect-id for a given
|
||||
* domain-id
|
||||
*
|
||||
* @param integer $domainid id of the domain
|
||||
*
|
||||
* @return integer redirect-code-id
|
||||
*/
|
||||
function getDomainRedirectId($domainid = 0)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$code = 1;
|
||||
if($domainid > 0)
|
||||
{
|
||||
$sql = "SELECT `r`.`id` as `redirect`
|
||||
FROM `".TABLE_PANEL_REDIRECTCODES."` `r`, `".TABLE_PANEL_DOMAINREDIRECTS."` `rc`
|
||||
WHERE `r`.`id` = `rc`.`rid` and `rc`.`did` = '".(int)$domainid."'";
|
||||
|
||||
$result = $db->query_first($sql);
|
||||
|
||||
if(is_array($result)
|
||||
&& isset($result['redirect'])
|
||||
) {
|
||||
$code = (int)$result['redirect'];
|
||||
}
|
||||
}
|
||||
return $code;
|
||||
}
|
||||
|
||||
/**
|
||||
* adds a redirectcode for a domain
|
||||
*
|
||||
* @param integer $domainid id of the domain to add the code for
|
||||
* @param integer $redirect selected redirect-id
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
function addRedirectToDomain($domainid = 0, $redirect = 1)
|
||||
{
|
||||
global $db;
|
||||
if($domainid > 0)
|
||||
{
|
||||
$db->query("INSERT INTO `".TABLE_PANEL_DOMAINREDIRECTS."`
|
||||
SET `rid` = '".(int)$redirect."', `did` = '".(int)$domainid."'");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* updates the redirectcode of a domain
|
||||
* if redirect-code is false, nothing happens
|
||||
*
|
||||
* @param integer $domainid id of the domain to update
|
||||
* @param integer $redirect selected redirect-id or false
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
function updateRedirectOfDomain($domainid = 0, $redirect = false)
|
||||
{
|
||||
global $db;
|
||||
|
||||
if($redirect == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if($domainid > 0)
|
||||
{
|
||||
$db->query("UPDATE `".TABLE_PANEL_DOMAINREDIRECTS."`
|
||||
SET `rid` = '".(int)$redirect."'
|
||||
WHERE `did` = '".(int)$domainid."'");
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Language
|
||||
* @package Functions
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
|
||||
45
lib/functions/validate/function.appendOpenbasedirPath.php
Normal file
45
lib/functions/validate/function.appendOpenbasedirPath.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?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 Functions
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* checks give path for security issues
|
||||
* and returns a string that can be appended
|
||||
* to a line for a open_basedir directive
|
||||
*
|
||||
* @param string $path the path to check and append
|
||||
* @param boolean $first if true, no ':' will be prefixed to the path
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function appendOpenBasedirPath($path = '', $first = false)
|
||||
{
|
||||
$path = makeCorrectDir($path);
|
||||
if($path != ''
|
||||
&& $path != '/'
|
||||
&& !preg_match("#^/dev#i", $path)
|
||||
&& !preg_match("#^/proc#i", $path)
|
||||
&& !preg_match("#^/etc#i", $path)
|
||||
&& !preg_match("#^/sys#i", $path)
|
||||
&& !preg_match("#:#", $path)
|
||||
) {
|
||||
if($first)
|
||||
return $path;
|
||||
|
||||
return ':' . $path;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
@@ -39,22 +39,13 @@ function validateDomain($domainname)
|
||||
|
||||
// there is a bug in php 5.2.13 - 5.3.2 which
|
||||
// lets filter_var fail if the domain has
|
||||
// a dash (-) in it. #
|
||||
if(version_compare("5.2.13", PHP_VERSION, "=")
|
||||
|| version_compare("5.3.2", PHP_VERSION, "="))
|
||||
{
|
||||
$pattern = '/^http:\/\/([a-z0-9]([a-z0-9\-]{0,61}[a-z0-9])?\.)+[a-z]{2,6}$/i';
|
||||
if(preg_match($pattern, $domainname_tmp))
|
||||
{
|
||||
return $domainname;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(filter_var($domainname_tmp, FILTER_VALIDATE_URL) !== false && filter_var($domainname_tmp, FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED) === false && filter_var($domainname_tmp, FILTER_VALIDATE_URL, FILTER_FLAG_QUERY_REQUIRED) === false)
|
||||
{
|
||||
return $domainname;
|
||||
}
|
||||
// a dash (-) in it. As the PHP_VERSION constant
|
||||
// gives also patch-brandings, e.g. '5.3.2-pl0-gentoo'
|
||||
// we just always use our regex
|
||||
$pattern = '/^http:\/\/([a-z0-9]([a-z0-9\-]{0,61}[a-z0-9])?\.)+[a-z]{2,6}$/i';
|
||||
if(preg_match($pattern, $domainname_tmp))
|
||||
{
|
||||
return $domainname;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -28,27 +28,21 @@
|
||||
|
||||
function validateUrl($url)
|
||||
{
|
||||
global $idna_convert;
|
||||
|
||||
if(strtolower(substr($url, 0, 7)) != "http://"
|
||||
&& strtolower(substr($url, 0, 8)) != "https://")
|
||||
{
|
||||
$url = 'http://' . $url;
|
||||
}
|
||||
|
||||
// needs converting
|
||||
$url = $idna_convert->encode($url);
|
||||
|
||||
if(version_compare("5.2.13", PHP_VERSION, "=")
|
||||
|| version_compare("5.3.2", PHP_VERSION, "="))
|
||||
$pattern = "/^https?:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?$/i";
|
||||
if(preg_match($pattern, $url))
|
||||
{
|
||||
$pattern = '/^https?:\/\/([a-z0-9]([a-z0-9\-]{0,61}[a-z0-9])?\.)+[a-z]{2,6}$/i';
|
||||
if(preg_match($pattern, $url))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED) !== false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// not an fqdn
|
||||
|
||||
@@ -51,6 +51,8 @@ define('TABLE_APS_SETTINGS', 'aps_settings');
|
||||
define('TABLE_APS_TASKS', 'aps_tasks');
|
||||
define('TABLE_APS_TEMP_SETTINGS', 'aps_temp_settings');
|
||||
define('TABLE_PANEL_CRONRUNS', 'cronjobs_run');
|
||||
define('TABLE_PANEL_REDIRECTCODES', 'redirect_codes');
|
||||
define('TABLE_PANEL_DOMAINREDIRECTS', 'domain_redirect_codes');
|
||||
|
||||
// APS constants
|
||||
|
||||
@@ -70,7 +72,7 @@ define('PACKAGE_ENABLED', 2);
|
||||
|
||||
// VERSION INFO
|
||||
|
||||
$version = '0.9.6';
|
||||
$version = '0.9.8';
|
||||
$dbversion = '2';
|
||||
$branding = '';
|
||||
|
||||
|
||||
@@ -1350,7 +1350,7 @@ $lng['serversettings']['stdsubdomainhost']['description'] = 'What hostname shoul
|
||||
// ADDED IN FROXLOR 0.9.4-svn1
|
||||
$lng['ftp']['account_edit'] = 'Edit ftp account';
|
||||
$lng['ftp']['editpassdescription'] = 'Set new password or leave blank for no change.';
|
||||
$lng['mysql']['sendinfomail'] = 'Send data via email to me';
|
||||
$lng['customer']['sendinfomail'] = 'Send data via email to me';
|
||||
$lng['customer']['mysql_add']['infomail_subject'] = '[Froxlor] New database created';
|
||||
$lng['customer']['mysql_add']['infomail_body']['pma'] = "\nYou can access your databases using phpMyAdmin via {URI}\n";
|
||||
$lng['customer']['mysql_add']['infomail_body']['main'] = "Hello {CUST_NAME},\n\nyou have just added a new database. Here is the entered information:\n\nDatabasename: {DB_NAME}\nPassword: {DB_PASS}\nDescription: {DB_DESC}\nDB-Hostname: {DB_SRV}\n{PMA_URI}\nYours sincerely, the Froxlor-Team";
|
||||
@@ -1391,4 +1391,36 @@ $lng['serversettings']['ftpserver']['desc'] = 'If pureftpd is selected the .ftpq
|
||||
// CHANGED IN FROXLOR 0.9.6-svn6
|
||||
$lng['serversettings']['ftpprefix']['description'] = 'Which prefix should ftp accounts have?<br/><b>If you change this you also have to change the Quota SQL Query in your FTP Server config file in case you use it!</b> ';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.7-svn1
|
||||
$lng['customer']['ftp_add']['infomail_subject'] = '[Froxlor] New ftp-user created';
|
||||
$lng['customer']['ftp_add']['infomail_body']['main'] = "Hello {CUST_NAME},\n\nyou have just added a new ftp-user. Here is the entered information:\n\nUsername: {USR_NAME}\nPassword: {USR_PASS}\nPath: {USR_PATH}\n\nYours sincerely, the Froxlor-Team";
|
||||
$lng['domains']['redirectifpathisurl'] = 'Redirect code (default: empty)';
|
||||
$lng['domains']['redirectifpathisurlinfo'] = 'You only need to select one of these if you entered an URL as path';
|
||||
$lng['serversettings']['customredirect_enabled']['title'] = 'Allow customer redirects';
|
||||
$lng['serversettings']['customredirect_enabled']['description'] = 'Allow customers to choose the http-status code for redirects which will be used';
|
||||
$lng['serversettings']['customredirect_default']['title'] = 'Default redirect';
|
||||
$lng['serversettings']['customredirect_default']['description'] = 'Set the default redirect-code which should be used if the customer does not set it himself';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.7-svn2
|
||||
$lng['error']['pathmaynotcontaincolon'] = 'The path you have entered should not contain a colon (":"). Please enter a correct path value.';
|
||||
$lng['tasks']['aps_task_install'] = 'Installing one or more APS packages';
|
||||
$lng['tasks']['aps_task_remove'] = 'Removing one or more APS packages';
|
||||
$lng['tasks']['aps_task_reconfigure'] = 'Reconfigurating one or more APS packages';
|
||||
$lng['tasks']['aps_task_upgrade'] = 'Upgrading one or more APS packages';
|
||||
$lng['tasks']['aps_task_sysupdate'] = 'Updating all APS packages';
|
||||
$lng['tasks']['aps_task_sysdownload'] = 'Downloading new APS packages';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.7-svn3
|
||||
|
||||
// these stay only in english.lng.php - they are the same
|
||||
// for all other languages and are used if not found there
|
||||
$lng['redirect_desc']['rc_default'] = 'default';
|
||||
$lng['redirect_desc']['rc_movedperm'] = 'moved permanently';
|
||||
$lng['redirect_desc']['rc_found'] = 'found';
|
||||
$lng['redirect_desc']['rc_seeother'] = 'see other';
|
||||
$lng['redirect_desc']['rc_tempred'] = 'temporary redirect';
|
||||
|
||||
// ADDED UN FROXLOR 0.9.8
|
||||
$lng['error']['exception'] = '%s';
|
||||
|
||||
?>
|
||||
|
||||
@@ -1330,7 +1330,7 @@ $lng['serversettings']['stdsubdomainhost']['description'] = 'Welcher Hostname so
|
||||
// ADDED IN FROXLOR 0.9.4-svn1
|
||||
$lng['ftp']['account_edit'] = 'FTP Konto bearbeiten';
|
||||
$lng['ftp']['editpassdescription'] = 'Neues Passwort setzen oder leer für keine Änderung.';
|
||||
$lng['mysql']['sendinfomail'] = 'Daten per E-Mail an mich senden';
|
||||
$lng['customer']['sendinfomail'] = 'Daten per E-Mail an mich senden';
|
||||
$lng['customer']['mysql_add']['infomail_subject'] = '[Froxlor] Neue Datenbank erstellt';
|
||||
$lng['customer']['mysql_add']['infomail_body']['pma'] = "\nDie Datenbank kann mit phpMyAdmin via {URI} verwaltet werden.\n";
|
||||
$lng['customer']['mysql_add']['infomail_body']['main'] = "Hallo {CUST_NAME},\n\ndu hast gerade eine neue Datenbank angelegt. Hier die angegebenen Informationen:\n\nDatenbankname: {DB_NAME}\nPasswort: {DB_PASS}\nBeschreibung: {DB_DESC}\nDatenbank-Server: {DB_SRV}\n{PMA_URI}\nVielen Dank, das Froxlor-Team";
|
||||
@@ -1387,4 +1387,23 @@ $lng['serversettings']['ftpserver']['desc'] = 'Wenn pureftpd ausgewählt ist
|
||||
// CHANGED IN FROXLOR 0.9.6-svn5
|
||||
$lng['serversettings']['ftpprefix']['description'] = 'Welchen Prefix sollen die FTP-Benutzerkonten haben?<br/><b>Wenn du das änderst, musst du auch das Quota SQL Query in der FTP Server Config ändern, solltest du FTP-Quotas benutzen!</b>';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.7-svn1
|
||||
$lng['customer']['ftp_add']['infomail_subject'] = '[Froxlor] Neuer FTP-Benutzer erstellt';
|
||||
$lng['customer']['ftp_add']['infomail_body']['main'] = "Hallo {CUST_NAME},\n\ndu hast gerade einen neuen FTP-Benutzer angelegt. Hier die angegebenen Informationen:\n\nBenutzername: {USR_NAME}\nPasswort: {USR_PASS}\nPfad: {USR_PATH}\n\nVielen Dank, das Froxlor-Team";
|
||||
$lng['domains']['redirectifpathisurl'] = 'Redirect code (Standard: leer)';
|
||||
$lng['domains']['redirectifpathisurlinfo'] = 'Der Redirect code kann gewählt werden, wenn der eingegebene Pfad eine URL ist';
|
||||
$lng['serversettings']['customredirect_enabled']['title'] = 'Erlaube Kunden-Redirect';
|
||||
$lng['serversettings']['customredirect_enabled']['description'] = 'Erlaubt es Kunden den HTTP-Status Code für einen Redirect zu wählen';
|
||||
$lng['serversettings']['customredirect_default']['title'] = 'Standard Redirect';
|
||||
$lng['serversettings']['customredirect_default']['description'] = 'Dieser Redirect wird immer genutzt, sofern der Kunde keinen anderen auswählt.';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.7-svn2
|
||||
$lng['error']['pathmaynotcontaincolon'] = 'Der eingegebene Pfad sollte keinen Doppelpunkt (":") enthalten. Bitte geben Sie einen korrekten Wert für den Pfad ein.';
|
||||
$lng['tasks']['aps_task_install'] = 'Installation eines oder mehrerer APS Pakete';
|
||||
$lng['tasks']['aps_task_remove'] = 'Deinstallation eines oder mehrerer APS Pakete';
|
||||
$lng['tasks']['aps_task_reconfigure'] = 'Rekonfiguration eines oder mehrerer APS Pakete';
|
||||
$lng['tasks']['aps_task_upgrade'] = 'Upgrade eines oder mehrerer APS Pakete';
|
||||
$lng['tasks']['aps_task_sysupdate'] = 'Aktualisiere alle APS Pakete';
|
||||
$lng['tasks']['aps_task_sysdownload'] = 'Herunterladen neuer APS Pakete';
|
||||
|
||||
?>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -344,12 +344,12 @@ $lng['serversettings']['ipaddress']['title'] = 'Adres IP';
|
||||
$lng['serversettings']['ipaddress']['description'] = 'Jaki jest adres IP tego serwera?';
|
||||
$lng['serversettings']['hostname']['title'] = 'Hostname';
|
||||
$lng['serversettings']['hostname']['description'] = 'Jaki jest Hostname serwera?';
|
||||
$lng['serversettings']['apachereload_command']['title'] = 'Apache reload command';
|
||||
$lng['serversettings']['apachereload_command']['description'] = 'What\'s the apache command to reload apache configfiles?';
|
||||
$lng['serversettings']['bindconf_directory']['title'] = 'Bind config directory';
|
||||
$lng['serversettings']['bindconf_directory']['description'] = 'Where should bind configfiles be saved?';
|
||||
$lng['serversettings']['bindreload_command']['title'] = 'Bind reload command';
|
||||
$lng['serversettings']['bindreload_command']['description'] = 'What\'s the bind command to reload bind configfiles?';
|
||||
$lng['serversettings']['apachereload_command']['title'] = 'Komenda prze<7A>adowania Apache';
|
||||
$lng['serversettings']['apachereload_command']['description'] = 'Jaka jest komenda, do prze<7A>adowania plik<69>w konfiguracyjnych Apacha?';
|
||||
$lng['serversettings']['bindconf_directory']['title'] = 'Katalog z konfiguracj<63> Bunda';
|
||||
$lng['serversettings']['bindconf_directory']['description'] = 'Gdzie maja by<62> zapisywane pliki konfiguracyjne dla Binda?';
|
||||
$lng['serversettings']['bindreload_command']['title'] = 'Komenda prze<7A>adowania Binda';
|
||||
$lng['serversettings']['bindreload_command']['description'] = 'Jaka jest komenda, do prze<7A>adowania plik<69>w konfiguracyjnych Binda?';
|
||||
$lng['serversettings']['binddefaultzone']['title'] = 'Bind default zone';
|
||||
$lng['serversettings']['binddefaultzone']['description'] = 'What\'s the name of the default zone?';
|
||||
$lng['serversettings']['vmail_uid']['title'] = 'Mails-UID';
|
||||
@@ -367,7 +367,7 @@ $lng['serversettings']['webmail_url']['description'] = 'Jaki jest adres URL do W
|
||||
$lng['serversettings']['webftp_url']['title'] = 'URL do WebFTPa';
|
||||
$lng['serversettings']['webftp_url']['description'] = 'Jaki jest adres URL do WebFTPa? (Musi się rozpoczynać do http(s)://)';
|
||||
$lng['serversettings']['language']['description'] = 'Jaki jest standardowy język serwera?';
|
||||
$lng['serversettings']['maxloginattempts']['title'] = 'Max Login Attempts';
|
||||
$lng['serversettings']['maxloginattempts']['title'] = 'Maksymalna ilo<6C><6F> pr<70>b logowania';
|
||||
$lng['serversettings']['maxloginattempts']['description'] = 'Maximum login attempts after which the account gets deactivated.';
|
||||
$lng['serversettings']['deactivatetime']['title'] = 'Czas zablokowania';
|
||||
$lng['serversettings']['deactivatetime']['description'] = 'Czas (sek.) zablokowania dostępu do konta po nieudanym logowaniu.';
|
||||
@@ -710,7 +710,7 @@ $lng['serversettings']['mod_fcgid']['tmpdir'] = 'Katalog plik
|
||||
$lng['serversettings']['ticket']['reset_cycle'] = 'Okresowe reset licznika użycia zgłoszeń pomocy technicznej';
|
||||
$lng['serversettings']['ticket']['reset_cycle_desc'] = 'Resetowanie zgłoszeń pomocy technicznej powoduje ustawienie licznika na wartość 0 przy każdym cyklu';
|
||||
$lng['admin']['tickets']['daily'] = 'Dziennie';
|
||||
$lng['admin']['tickets']['weekly'] = 'Wygodniowo';
|
||||
$lng['admin']['tickets']['weekly'] = 'Tygodniowo';
|
||||
$lng['admin']['tickets']['monthly'] = 'Miesięcznie';
|
||||
$lng['admin']['tickets']['yearly'] = 'Rocznie';
|
||||
$lng['error']['ticketresetcycleiswrong'] = 'The cycle for ticket-resets has to be "daily", "weekly", "monthly" or "yearly".';
|
||||
@@ -1349,7 +1349,7 @@ $lng['serversettings']['stdsubdomainhost']['description'] = 'What hostname shoul
|
||||
// ADDED IN FROXLOR 0.9.4-svn1
|
||||
$lng['ftp']['account_edit'] = 'Edytuj konto ftp';
|
||||
$lng['ftp']['editpassdescription'] = 'Ustal nowe hasło lub zostaw puste by nie zmieniać.';
|
||||
$lng['mysql']['sendinfomail'] = 'Send data via email to me';
|
||||
$lng['customer']['sendinfomail'] = 'Send data via email to me';
|
||||
$lng['customer']['mysql_add']['infomail_subject'] = '[Froxlor] Nowa baza danych utworzona';
|
||||
$lng['customer']['mysql_add']['infomail_body']['pma'] = "\nMasz dostęp do Twojej bazy danych uzywając phpMyAdmina pod adresem {URI}\n";
|
||||
$lng['customer']['mysql_add']['infomail_body']['main'] = "Witaj {CUST_NAME},\n\nwłaśnie dodałeś nową bazę danych. Przesyłamy dane uruchomieniowe:\n\nBaza danych: {DB_NAME}\nHasło: {DB_PASS}\nOpis: {DB_DESC}\n{PMA_URI}\nZ poważaniem, Froxlor";
|
||||
@@ -1376,4 +1376,18 @@ $lng['serversettings']['defaultwebsrverrhandler_err404'] = 'Plik/URL dla bł&
|
||||
$lng['serversettings']['defaultwebsrverrhandler_err500']['title'] = 'Plik/URL dla błędu 500';
|
||||
$lng['serversettings']['defaultwebsrverrhandler_err500']['description'] = '<div style="color:red">'.$lng['panel']['not_supported'].'lighttpd</div>';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.6-svn4
|
||||
$lng['serversettings']['ticket']['default_priority'] = 'Standardowy priorytet dla zg<7A>osze<7A> pomocy technicznej';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.6-svn5
|
||||
$lng['serversettings']['mod_fcgid']['defaultini'] = 'Default PHP configuration for new domains';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.6-svn6
|
||||
$lng['admin']['ftpserver'] = 'Serwer FTP';
|
||||
$lng['admin']['ftpserversettings'] = 'Ustawienia Serwera FTP';
|
||||
$lng['serversettings']['ftpserver']['desc'] = 'Je<4A>li pureftpd jest zaznaczone, plik .ftpquota z quotami u<>ytkownika b<>dzie tworzony i aktualizowany codziennie';
|
||||
|
||||
// CHANGED IN FROXLOR 0.9.6-svn6
|
||||
$lng['serversettings']['ftpprefix']['description'] = 'Which prefix should ftp accounts have?<br/><b>If you change this you also have to change the Quota SQL Query in your FTP Server config file in case you use it!</b> ';
|
||||
|
||||
?>
|
||||
@@ -67,7 +67,14 @@ class apache
|
||||
*/
|
||||
private function _createStandardDirectoryEntry()
|
||||
{
|
||||
$vhosts_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/05_froxlor_dirfix_nofcgid.conf');
|
||||
$vhosts_folder = '';
|
||||
if(is_dir($this->settings['system']['apacheconf_vhost']))
|
||||
{
|
||||
$vhosts_folder = makeCorrectDir($this->settings['system']['apacheconf_vhost']);
|
||||
} else {
|
||||
$vhosts_folder = makeCorrectDir(dirname($this->settings['system']['apacheconf_vhost']));
|
||||
}
|
||||
$vhosts_filename = makeCorrectFile($vhosts_folder . '/05_froxlor_dirfix_nofcgid.conf');
|
||||
|
||||
if($this->settings['system']['mod_fcgid'] == '1')
|
||||
{
|
||||
@@ -104,7 +111,15 @@ class apache
|
||||
|| $this->settings['defaultwebsrverrhandler']['err404'] != ''
|
||||
|| $this->settings['defaultwebsrverrhandler']['err500'] != '')
|
||||
) {
|
||||
$vhosts_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/05_froxlor_default_errorhandler.conf');
|
||||
$vhosts_folder = '';
|
||||
if(is_dir($this->settings['system']['apacheconf_vhost']))
|
||||
{
|
||||
$vhosts_folder = makeCorrectDir($this->settings['system']['apacheconf_vhost']);
|
||||
} else {
|
||||
$vhosts_folder = makeCorrectDir(dirname($this->settings['system']['apacheconf_vhost']));
|
||||
}
|
||||
|
||||
$vhosts_filename = makeCorrectFile($vhosts_folder . '/05_froxlor_default_errorhandler.conf');
|
||||
|
||||
if(!isset($this->virtualhosts_data[$vhosts_filename]))
|
||||
{
|
||||
@@ -177,7 +192,7 @@ class apache
|
||||
/**
|
||||
* add 'real'-vhost content here, like doc-root :)
|
||||
*/
|
||||
$mypath = makeCorrectDir(dirname(dirname(dirname(__FILE__))));
|
||||
$mypath = makeCorrectDir(dirname(dirname(dirname(dirname(__FILE__)))));
|
||||
$this->virtualhosts_data[$vhosts_filename].= 'DocumentRoot "'.$mypath.'"'."\n";
|
||||
|
||||
if($row_ipsandports['vhostcontainer_servername_statement'] == '1')
|
||||
@@ -270,23 +285,22 @@ class apache
|
||||
|
||||
if($domain['openbasedir'] == '1')
|
||||
{
|
||||
if($this->settings['system']['phpappendopenbasedir'] != '')
|
||||
if($domain['openbasedir_path'] == '1' || strstr($domain['documentroot'], ":") !== false)
|
||||
{
|
||||
$_phpappendopenbasedir = ':' . $this->settings['system']['phpappendopenbasedir'];
|
||||
$_phpappendopenbasedir = appendOpenBasedirPath($domain['customerroot'], true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$_phpappendopenbasedir = '';
|
||||
$_phpappendopenbasedir = appendOpenBasedirPath($domain['documentroot'], true);
|
||||
}
|
||||
|
||||
$_custom_openbasedir = explode(':', $this->settings['system']['phpappendopenbasedir']);
|
||||
foreach($_custom_openbasedir as $cobd)
|
||||
{
|
||||
$_phpappendopenbasedir .= appendOpenBasedirPath($cobd);
|
||||
}
|
||||
|
||||
if($domain['openbasedir_path'] == '1')
|
||||
{
|
||||
$php_options_text.= ' php_admin_value open_basedir "' . $domain['customerroot'] . $_phpappendopenbasedir . "\"\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$php_options_text.= ' php_admin_value open_basedir "' . $domain['documentroot'] . $_phpappendopenbasedir . "\"\n";
|
||||
}
|
||||
$php_options_text.= ' php_admin_value open_basedir "' . $_phpappendopenbasedir . '"'."\n";
|
||||
}
|
||||
|
||||
if($domain['safemode'] == '0')
|
||||
@@ -622,7 +636,8 @@ class apache
|
||||
|
||||
if(preg_match('/^https?\:\/\//', $domain['documentroot']))
|
||||
{
|
||||
$vhost_content.= ' Redirect 301 / ' . $this->idnaConvert->encode($domain['documentroot']) . "\n";
|
||||
$code = getDomainRedirectCode($domain['id']);
|
||||
$vhost_content.= ' Redirect '.$code.' / ' . $this->idnaConvert->encode($domain['documentroot']) . "\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -166,22 +166,42 @@ class apache_fcgid extends apache
|
||||
if($domain['openbasedir'] == '1')
|
||||
{
|
||||
$openbasedirc = '';
|
||||
if($domain['openbasedir_path'] == '0')
|
||||
$_phpappendopenbasedir = '';
|
||||
|
||||
$_custom_openbasedir = explode(':', $this->settings['system']['mod_fcgid_peardir']);
|
||||
foreach($_custom_openbasedir as $cobd)
|
||||
{
|
||||
$openbasedir = $domain['documentroot'] . ':' . $tmpdir . ':' . $this->settings['system']['mod_fcgid_peardir'] . ':' . $this->settings['system']['phpappendopenbasedir'];
|
||||
$_phpappendopenbasedir .= appendOpenBasedirPath($cobd);
|
||||
}
|
||||
|
||||
$_custom_openbasedir = explode(':', $this->settings['system']['phpappendopenbasedir']);
|
||||
foreach($_custom_openbasedir as $cobd)
|
||||
{
|
||||
$_phpappendopenbasedir .= appendOpenBasedirPath($cobd);
|
||||
}
|
||||
|
||||
if($domain['openbasedir_path'] == '0' && strstr($domain['documentroot'], ":") === false)
|
||||
{
|
||||
$openbasedir = appendOpenBasedirPath($domain['documentroot'], true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$openbasedir = $domain['customerroot'] . ':' . $tmpdir . ':' . $this->settings['system']['mod_fcgid_peardir'] . ':' . $this->settings['system']['phpappendopenbasedir'];
|
||||
$openbasedir = appendOpenBasedirPath($domain['customerroot'], true);
|
||||
}
|
||||
|
||||
$openbasedir .= appendOpenBasedirPath($tmpdir);
|
||||
$openbasedir .= $_phpappendopenbasedir;
|
||||
|
||||
$openbasedir = explode(':', $openbasedir);
|
||||
$clean_openbasedir = array();
|
||||
foreach($openbasedir as $number => $path)
|
||||
{
|
||||
$openbasedir[$number] = makeCorrectDir($path);
|
||||
if(trim($path) != '/')
|
||||
{
|
||||
$clean_openbasedir[] = makeCorrectDir($path);
|
||||
}
|
||||
}
|
||||
|
||||
$openbasedir = implode(':', $openbasedir);
|
||||
$openbasedir = implode(':', $clean_openbasedir);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -107,7 +107,7 @@ class lighttpd
|
||||
$this->lighttpd_data[$vhost_filename].= '# Froxlor default vhost' . "\n";
|
||||
$this->lighttpd_data[$vhost_filename].= '$HTTP["host"] =~ "^(?:www\.|)' . $myhost . '$" {' . "\n";
|
||||
|
||||
$mypath = makeCorrectDir(dirname(dirname(dirname(__FILE__))));
|
||||
$mypath = makeCorrectDir(dirname(dirname(dirname(dirname(__FILE__)))));
|
||||
$this->lighttpd_data[$vhost_filename].= ' server.document-root = "'.$mypath.'"'."\n";
|
||||
|
||||
/**
|
||||
|
||||
@@ -190,22 +190,42 @@ class lighttpd_fcgid extends lighttpd
|
||||
if($domain['openbasedir'] == '1')
|
||||
{
|
||||
$openbasedirc = '';
|
||||
if($domain['openbasedir_path'] == '0')
|
||||
$_phpappendopenbasedir = '';
|
||||
|
||||
$_custom_openbasedir = explode(':', $this->settings['system']['mod_fcgid_peardir']);
|
||||
foreach($_custom_openbasedir as $cobd)
|
||||
{
|
||||
$openbasedir = $domain['documentroot'] . ':' . $tmpdir . ':' . $this->settings['system']['mod_fcgid_peardir'] . ':' . $this->settings['system']['phpappendopenbasedir'];
|
||||
$_phpappendopenbasedir .= appendOpenBasedirPath($cobd);
|
||||
}
|
||||
|
||||
$_custom_openbasedir = explode(':', $this->settings['system']['phpappendopenbasedir']);
|
||||
foreach($_custom_openbasedir as $cobd)
|
||||
{
|
||||
$_phpappendopenbasedir .= appendOpenBasedirPath($cobd);
|
||||
}
|
||||
|
||||
if($domain['openbasedir_path'] == '0' && strstr($domain['documentroot'], ":") === false)
|
||||
{
|
||||
$openbasedir = appendOpenBasedirPath($domain['documentroot'], true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$openbasedir = $domain['customerroot'] . ':' . $tmpdir . ':' . $this->settings['system']['mod_fcgid_peardir'] . ':' . $this->settings['system']['phpappendopenbasedir'];
|
||||
$openbasedir = appendOpenBasedirPath($domain['customerroot'], true);
|
||||
}
|
||||
|
||||
$openbasedir .= appendOpenBasedirPath($tmpdir);
|
||||
$openbasedir .= $_phpappendopenbasedir;
|
||||
|
||||
$openbasedir = explode(':', $openbasedir);
|
||||
$clean_openbasedir = array();
|
||||
foreach($openbasedir as $number => $path)
|
||||
{
|
||||
$openbasedir[$number] = makeCorrectDir($path);
|
||||
if(trim($path) != '/')
|
||||
{
|
||||
$clean_openbasedir[] = makeCorrectDir($path);
|
||||
}
|
||||
}
|
||||
|
||||
$openbasedir = implode(':', $openbasedir);
|
||||
$openbasedir = implode(':', $clean_openbasedir);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -235,6 +235,37 @@ $awstatsclean['headerold']) {
|
||||
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Running: rm -rf ' . escapeshellarg($maildir));
|
||||
safe_exec('rm -rf '.escapeshellarg($maildir));
|
||||
}
|
||||
|
||||
/*
|
||||
* see if we have some php-fcgid leftovers if used
|
||||
* and remove them, #200
|
||||
*/
|
||||
if($settings['system']['mod_fcgid'] == 1)
|
||||
{
|
||||
// e.g. /var/www/php-fcgi-starter/web1/
|
||||
$configdir = makeCorrectDir($settings['system']['mod_fcgid_configdir'] . '/' . $row['data']['loginname'] . '/');
|
||||
|
||||
if (is_dir($configdir))
|
||||
{
|
||||
$its = new RecursiveIteratorIterator(
|
||||
new RecursiveDirectoryIterator($configdir)
|
||||
);
|
||||
|
||||
// iterate through all subdirs,
|
||||
// look for php-fcgi-starter files
|
||||
// and take chattr +i away from them
|
||||
// so we can delete them :)
|
||||
foreach ($its as $fullFileName => $it )
|
||||
{
|
||||
if ($it->isFile() && $it->getFilename() == 'php-fcgi-starter')
|
||||
{
|
||||
safe_exec('chattr -i ' . escapeshellarg($its->getPathname()));
|
||||
}
|
||||
}
|
||||
// now get rid of old stuff
|
||||
safe_exec('rm -rf '. escapeshellarg($configdir));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ function awstatsDoSingleDomain($domain, $outputdir)
|
||||
* check for correct path of awstats_buildstaticpages.pl
|
||||
*/
|
||||
$awbsp = makeCorrectFile($settings['system']['awstats_path'].'/awstats_buildstaticpages.pl');
|
||||
$awprog = makeCorrectFile($settings['system']['awstats_path'].'/awstats.pl');
|
||||
|
||||
if (!file_exists($awbsp)) {
|
||||
echo "WANRING: Necessary awstats_buildstaticpages.pl script could not be found, no traffic is being calculated and no stats are generated. Please check your AWStats-Path setting";
|
||||
@@ -44,7 +45,7 @@ function awstatsDoSingleDomain($domain, $outputdir)
|
||||
}
|
||||
|
||||
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Running awstats_buildstaticpages.pl for domain '".$domain."' (Output: '".$outputdir."')");
|
||||
safe_exec($awbsp.' -update -config=' . $domain . ' -dir='.escapeshellarg($outputdir));
|
||||
safe_exec($awbsp.' -awstatsprog='.escapeshellarg($awprog).' -update -config=' . $domain . ' -dir='.escapeshellarg($outputdir));
|
||||
|
||||
/**
|
||||
* index file is saved like 'awstats.[domain].html',
|
||||
|
||||
@@ -4,7 +4,7 @@ $header
|
||||
<input type="hidden" name="page" value="$page"/>
|
||||
<table cellpadding="5" cellspacing="0" border="0" align="center" class="maintable">
|
||||
<tr>
|
||||
<td class="maintitle_search_left" colspan="3"><b><img src="images/title.gif" alt="" /> {$lng['admin']['admins']}</b></td>
|
||||
<td class="maintitle_search_left" colspan="3"><b><img src="images/title.gif" alt="" /> {$lng['admin']['admins']}</b> ({$admincount})</td>
|
||||
<td class="maintitle_search_right" colspan="<if $settings['ticket']['enabled'] == 1 >7<else>6</if>">{$searchcode}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -4,7 +4,7 @@ $header
|
||||
<input type="hidden" name="page" value="$page"/>
|
||||
<table cellpadding="5" cellspacing="0" border="0" align="center" class="maintable">
|
||||
<tr>
|
||||
<td class="maintitle_search_left" colspan="3" ><b><img src="images/title.gif" alt="" /> {$lng['admin']['customers']}</b></td>
|
||||
<td class="maintitle_search_left" colspan="3" ><b><img src="images/title.gif" alt="" /> {$lng['admin']['customers']}</b> ({$customercount})</td>
|
||||
<td class="maintitle_search_right" colspan="<if $settings['ticket']['enabled'] == 1 >8<else>7</if>">{$searchcode}</td>
|
||||
</tr>
|
||||
<if ($userinfo['customers_used'] < $userinfo['customers'] || $userinfo['customers'] == '-1') && 15 < $userinfo['customers_used']>
|
||||
|
||||
@@ -18,7 +18,7 @@ $header
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['login']['username']}:</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="text" name="loginname" value="" maxlength="10" /></td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="text" name="new_loginname" value="" maxlength="10" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['admin']['stdsubdomain_add']}?</td>
|
||||
@@ -26,7 +26,7 @@ $header
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['login']['password']}:</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="password" name="customer_password" value="" /></td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="password" name="new_customer_password" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['admin']['sendpassword']}?</td>
|
||||
@@ -94,32 +94,32 @@ $header
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['customer']['diskspace']}: *</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="diskspace" value="" maxlength="6" /> {$diskspace_ul}</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="diskspace" value="0" maxlength="6" /> {$diskspace_ul}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['customer']['traffic']}: *</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="traffic" value="" maxlength="4" /> {$traffic_ul}</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="traffic" value="0" maxlength="4" /> {$traffic_ul}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['customer']['subdomains']}: *</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="subdomains" value="" maxlength="9" /> {$subdomains_ul}</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="subdomains" value="0" maxlength="9" /> {$subdomains_ul}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['customer']['emails']}: *</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="emails" value="" maxlength="9" /> {$emails_ul}</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="emails" value="0" maxlength="9" /> {$emails_ul}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['customer']['accounts']}: *</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="email_accounts" value="" maxlength="9" /> {$email_accounts_ul}</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="email_accounts" value="0" maxlength="9" /> {$email_accounts_ul}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['customer']['forwarders']}: *</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="email_forwarders" value="" maxlength="9" /> {$email_forwarders_ul}</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="email_forwarders" value="0" maxlength="9" /> {$email_forwarders_ul}</td>
|
||||
</tr>
|
||||
<if $settings['system']['mail_quota_enabled'] == 1>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['customer']['email_quota']}: *</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="email_quota" value="" maxlength="9" /> {$email_quota_ul}</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="email_quota" value="0" maxlength="9" /> {$email_quota_ul}</td>
|
||||
</tr>
|
||||
</if>
|
||||
<tr>
|
||||
@@ -132,17 +132,17 @@ $header
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['customer']['ftps']}: *</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="ftps" value="" maxlength="9" /> {$ftps_ul}</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="ftps" value="0" maxlength="9" /> {$ftps_ul}</td>
|
||||
</tr>
|
||||
<if $settings['ticket']['enabled'] == 1 >
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['customer']['tickets']}: *</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="tickets" value="" maxlength="9" /> {$tickets_ul}</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="tickets" value="0" maxlength="9" /> {$tickets_ul}</td>
|
||||
</tr>
|
||||
</if>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['customer']['mysqls']}: *</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="mysqls" value="" maxlength="9" /> {$mysqls_ul}</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="mysqls" value="0" maxlength="9" /> {$mysqls_ul}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['admin']['phpenabled']}?</td>
|
||||
|
||||
@@ -35,7 +35,7 @@ $header
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['login']['password']} ({$lng['panel']['emptyfornochanges']}):</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="password" name="customer_password" value="" /></td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="password" name="new_customer_password" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['login']['language']}:</td>
|
||||
|
||||
@@ -4,7 +4,7 @@ $header
|
||||
<input type="hidden" name="page" value="$page"/>
|
||||
<table cellpadding="5" cellspacing="0" border="0" align="center" class="maintable">
|
||||
<tr>
|
||||
<td class="maintitle_search_left"><b><img src="images/title.gif" alt="" /> {$lng['admin']['domains']}</b></td>
|
||||
<td class="maintitle_search_left"><b><img src="images/title.gif" alt="" /> {$lng['admin']['domains']}</b> ({$domainscount})</td>
|
||||
<td class="maintitle_search_right" colspan="4">{$searchcode}</td>
|
||||
</tr>
|
||||
<if ($userinfo['domains_used'] < $userinfo['domains'] || $userinfo['domains'] == '-1') && 15 < $count && 0 < $countcustomers >
|
||||
|
||||
@@ -4,7 +4,7 @@ $header
|
||||
<input type="hidden" name="page" value="$page" />
|
||||
<table cellpadding="5" cellspacing="0" border="0" align="center" class="maintable">
|
||||
<tr>
|
||||
<td class="maintitle_search_left"><b><img src="images/title.gif" alt="" /> {$lng['domains']['domainsettings']}</b></td>
|
||||
<td class="maintitle_search_left"><b><img src="images/title.gif" alt="" /> {$lng['domains']['domainsettings']}</b> ({$domains_count})</td>
|
||||
<td class="maintitle_search_right" colspan="3">{$searchcode}</td>
|
||||
</tr>
|
||||
<if ($userinfo['subdomains_used'] < $userinfo['subdomains'] || $userinfo['subdomains'] == '-1') && 15 < $domains_count && $parentdomains_count != 0 >
|
||||
|
||||
@@ -13,24 +13,31 @@ $header
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['domains']['aliasdomain']}:</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><select class="tendina_nobordo" name="alias">$aliasdomains</select></td>
|
||||
<td class="main_field_display" nowrap="nowrap"><select name="alias">$aliasdomains</select></td>
|
||||
</tr>
|
||||
<if $settings['panel']['pathedit'] != 'Dropdown'><tr>
|
||||
<td class="main_field_name">
|
||||
{$lng['panel']['pathorurl']}:<br />
|
||||
<font size="1">{$lng['panel']['pathDescription']}</font>
|
||||
</td>
|
||||
<td class="main_field_display" nowrap="nowrap">{$pathSelect}</td>
|
||||
</tr></if>
|
||||
<if $settings['panel']['pathedit'] == 'Dropdown'><tr>
|
||||
<td class="main_field_name">{$lng['panel']['path']}:</td>
|
||||
<td class="main_field_display">{$pathSelect}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['panel']['urloverridespath']}:</td>
|
||||
<td class="main_field_display"><input type="text" class="text" name="url" value="{$urlvalue}" size="30" /></td>
|
||||
</tr></if>
|
||||
<if $settings['system']['use_ssl'] == '1'>
|
||||
<if $settings['panel']['pathedit'] != 'Dropdown'>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['panel']['pathorurl']}:<br /><font size="1">{$lng['panel']['pathDescription']}</font></td>
|
||||
<td class="main_field_display" nowrap="nowrap">{$pathSelect}</td>
|
||||
</tr>
|
||||
</if>
|
||||
<if $settings['panel']['pathedit'] == 'Dropdown'>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['panel']['path']}:</td>
|
||||
<td class="main_field_display">{$pathSelect}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['panel']['urloverridespath']}:</td>
|
||||
<td class="main_field_display"><input type="text" class="text" name="url" value="{$urlvalue}" size="30" /></td>
|
||||
</tr>
|
||||
</if>
|
||||
<if $settings['system']['webserver'] == 'apache2' && $settings['customredirect']['enabled'] == '1'>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['domains']['redirectifpathisurl']}:<br /><font size="1">{$lng['domains']['redirectifpathisurlinfo']}</font></td>
|
||||
<td class="main_field_display" nowrap="nowrap"><select name="redirectcode">$redirectcode</select></td>
|
||||
</tr>
|
||||
</if>
|
||||
<if $settings['system']['use_ssl'] == '1'>
|
||||
<tr>
|
||||
<td class="main_field_name">SSL Redirect:</td>
|
||||
<td class="main_field_display" nowrap="nowrap">$ssl_redirect</td>
|
||||
|
||||
@@ -16,33 +16,46 @@ $header
|
||||
<td class="main_field_name">{$lng['dns']['destinationip']}:</td>
|
||||
<td class="main_field_display" nowrap="nowrap">{$domainip}</td>
|
||||
</tr>
|
||||
<if $alias_check == '0'><tr>
|
||||
<td class="main_field_name">{$lng['domains']['aliasdomain']}:</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><select class="tendina_nobordo" name="alias">$domains</select></td>
|
||||
</tr></if>
|
||||
<if $settings['panel']['pathedit'] != 'Dropdown'><tr>
|
||||
<td class="main_field_name">
|
||||
{$lng['panel']['pathorurl']}:<br />
|
||||
<font size="1">{$lng['panel']['pathDescription']}</font>
|
||||
</td>
|
||||
<td class="main_field_display" nowrap="nowrap">{$pathSelect}</td>
|
||||
</tr></if>
|
||||
<if $settings['panel']['pathedit'] == 'Dropdown'><tr>
|
||||
<td class="main_field_name">{$lng['panel']['path']}:</td>
|
||||
<td class="main_field_display">{$pathSelect}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['panel']['urloverridespath']}:</td>
|
||||
<td class="main_field_display"><input type="text" class="text" name="url" value="{$urlvalue}" size="30" /></td>
|
||||
</tr></if>
|
||||
<if $result['parentdomainid'] == '0' && $userinfo['subdomains'] != '0' ><tr>
|
||||
<td class="main_field_name">{$lng['domains']['wildcarddomain']}</td>
|
||||
<td class="main_field_display" nowrap="nowrap">$iswildcarddomain</td>
|
||||
</tr></if>
|
||||
<if ( $result['subcanemaildomain'] == '1' || $result['subcanemaildomain'] == '2' ) && $result['parentdomainid'] != '0' ><tr>
|
||||
<td class="main_field_name">Emaildomain:</td>
|
||||
<td class="main_field_display" nowrap="nowrap">$isemaildomain</td>
|
||||
</tr></if>
|
||||
<if $alias_check == '0'>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['domains']['aliasdomain']}:</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><select class="tendina_nobordo" name="alias">$domains</select></td>
|
||||
</tr>
|
||||
</if>
|
||||
<if $settings['panel']['pathedit'] != 'Dropdown'>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['panel']['pathorurl']}:<br /><font size="1">{$lng['panel']['pathDescription']}</font></td>
|
||||
<td class="main_field_display" nowrap="nowrap">{$pathSelect}</td>
|
||||
</tr>
|
||||
</if>
|
||||
<if $settings['panel']['pathedit'] == 'Dropdown'>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['panel']['path']}:</td>
|
||||
<td class="main_field_display">{$pathSelect}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['panel']['urloverridespath']}:</td>
|
||||
<td class="main_field_display"><input type="text" class="text" name="url" value="{$urlvalue}" size="30" /></td>
|
||||
</tr>
|
||||
</if>
|
||||
<if $settings['system']['webserver'] == 'apache2' && $settings['customredirect']['enabled'] == '1'>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['domains']['redirectifpathisurl']}:<br /><font size="1">{$lng['domains']['redirectifpathisurlinfo']}</font></td>
|
||||
<td class="main_field_display" nowrap="nowrap"><select name="redirectcode">$redirectcode</select></td>
|
||||
</tr>
|
||||
</if>
|
||||
<if $result['parentdomainid'] == '0' && $userinfo['subdomains'] != '0' >
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['domains']['wildcarddomain']}</td>
|
||||
<td class="main_field_display" nowrap="nowrap">$iswildcarddomain</td>
|
||||
</tr>
|
||||
</if>
|
||||
<if ( $result['subcanemaildomain'] == '1' || $result['subcanemaildomain'] == '2' ) && $result['parentdomainid'] != '0' >
|
||||
<tr>
|
||||
<td class="main_field_name">Emaildomain:</td>
|
||||
<td class="main_field_display" nowrap="nowrap">$isemaildomain</td>
|
||||
</tr>
|
||||
</if>
|
||||
<if $settings['system']['use_ssl'] == '1'>
|
||||
<tr>
|
||||
<td class="main_field_name">SSL Redirect:</td>
|
||||
|
||||
@@ -4,7 +4,7 @@ $header
|
||||
<input type="hidden" name="page" value="$page" />
|
||||
<table cellpadding="5" cellspacing="0" border="0" align="center" class="maintable">
|
||||
<tr>
|
||||
<td class="maintitle_search_left"><b><img src="images/title.gif" alt="" /> {$lng['menue']['email']['emails']}</b></td>
|
||||
<td class="maintitle_search_left"><b><img src="images/title.gif" alt="" /> {$lng['menue']['email']['emails']}</b> ({$emailscount})</td>
|
||||
<td class="maintitle_search_right" colspan="6">{$searchcode}</td>
|
||||
</tr>
|
||||
<if ($userinfo['emails_used'] < $userinfo['emails'] || $userinfo['emails'] == '-1') && 15 < $emails_count && $emaildomains_count !=0 >
|
||||
|
||||
@@ -19,7 +19,7 @@ $header
|
||||
<tr>
|
||||
<td class="main_field_confirm" colspan="2"><input type="hidden" name="send" value="send" /><input type="submit" class="bottom" value="{$lng['emails']['emails_add']}" /></td>
|
||||
</tr>
|
||||
<else
|
||||
<else>
|
||||
<tr>
|
||||
<td class="main_field_name" colspan="2">{$lng['emails']['noemaildomainaddedyet']}</td>
|
||||
</tr>
|
||||
|
||||
@@ -5,7 +5,7 @@ $header
|
||||
<input type="hidden" name="send" value="send" />
|
||||
<table cellpadding="5" cellspacing="0" border="0" align="center" class="maintable">
|
||||
<tr>
|
||||
<td class="maintitle_search_left"><b><img src="images/title.gif" alt="" /> {$lng['menue']['ftp']['accounts']}</b></td>
|
||||
<td class="maintitle_search_left"><b><img src="images/title.gif" alt="" /> {$lng['menue']['ftp']['accounts']}</b> ({$ftps_count})</td>
|
||||
<td class="maintitle_search_right" colspan="3">{$searchcode}</td>
|
||||
</tr>
|
||||
<if ($userinfo['ftps_used'] < $userinfo['ftps'] || $userinfo['ftps'] == '-1') && 15 < $ftps_count >
|
||||
|
||||
@@ -25,6 +25,10 @@ $header
|
||||
<td class="main_field_name">{$lng['login']['password']}:</td>
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="password" name="ftp_password" size="30" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['customer']['sendinfomail']}:</td>
|
||||
<td class="main_field_display" nowrap="nowrap">{$sendinfomail}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_confirm" colspan="2"><input type="hidden" name="send" value="send" /><input type="submit" class="bottom" value="{$lng['ftp']['account_add']}" /></td>
|
||||
</tr>
|
||||
|
||||
@@ -4,7 +4,7 @@ $header
|
||||
<input type="hidden" name="page" value="$page" />
|
||||
<table cellpadding="5" cellspacing="0" border="0" align="center" class="maintable">
|
||||
<tr>
|
||||
<td class="maintitle_search_left" colspan="2"><b><img src="images/title.gif" alt="" /> {$lng['menue']['mysql']['databases']}</b></td>
|
||||
<td class="maintitle_search_left" colspan="2"><b><img src="images/title.gif" alt="" /> {$lng['menue']['mysql']['databases']}</b> ({$mysqls_count})</td>
|
||||
<td class="maintitle_search_right" colspan="3">{$searchcode}</td>
|
||||
</tr>
|
||||
<if ($userinfo['mysqls_used'] < $userinfo['mysqls'] || $userinfo['mysqls'] == '-1') && 15 < $mysqls_count >
|
||||
|
||||
@@ -22,7 +22,7 @@ $header
|
||||
<td class="main_field_display" nowrap="nowrap"><input type="password" name="mysql_password" maxlength="50" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name">{$lng['mysql']['sendinfomail']}:</td>
|
||||
<td class="main_field_name">{$lng['customer']['sendinfomail']}:</td>
|
||||
<td class="main_field_display" nowrap="nowrap">{$sendinfomail}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
# for Froxlor and AWStats to work together
|
||||
# you have to change the following line
|
||||
|
||||
# look for
|
||||
DirData="/some/folder/"
|
||||
|
||||
# and comment this out with a hash (#)
|
||||
#DirData="/some/folder/"
|
||||
@@ -3,7 +3,7 @@ protocols = imap pop3 <SSLPROTOCOLS>
|
||||
listen = *
|
||||
mail_access_groups = vmail
|
||||
mail_debug = no
|
||||
## Uncomment this line to allow Plaintext Logins from foreign IP if the Connection doesn't use TLS
|
||||
## allow Plaintext Logins from foreign IP if the Connection doesn't use TLS
|
||||
disable_plaintext_auth = no
|
||||
|
||||
### SSL Settings
|
||||
@@ -20,13 +20,13 @@ protocol imap {
|
||||
}
|
||||
|
||||
protocol pop3 {
|
||||
# Uncomment this line if you are migrating from Courier also see Migration from Courier
|
||||
# leave this uncommented if you are migrating from Courier also see Migration from Courier
|
||||
pop3_uidl_format = UID%u-%v
|
||||
mail_plugins = quota
|
||||
|
||||
}
|
||||
protocol lda {
|
||||
# postmaster is the one in charge of the mail system. MUST be set to a vailid address!
|
||||
# postmaster is the one in charge of the mail system. MUST be set to a valid address!
|
||||
postmaster_address = <postmaster-address>
|
||||
auth_socket_path = /var/run/dovecot/auth-master
|
||||
mail_plugins = quota
|
||||
|
||||
@@ -8,9 +8,9 @@ shadow.where_clause = ;
|
||||
shadow.userid_column = u.id;
|
||||
shadow.user_column = u.username;
|
||||
shadow.password_column = u.password;
|
||||
shadow.lastchange_column = UNIX_TIMESTAMP()-10;
|
||||
shadow.min_column = 1;
|
||||
shadow.max_column = 2;
|
||||
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;
|
||||
|
||||
@@ -4,7 +4,7 @@ users.database = <SQL_DB>;
|
||||
users.db_user = <SQL_UNPRIVILEGED_USER>;
|
||||
users.db_password = <SQL_UNPRIVILEGED_PASSWORD>;
|
||||
users.table = ftp_users u;
|
||||
users.where_clause =;
|
||||
users.where_clause = u.login_enabled = 'Y';
|
||||
users.user_column = u.username;
|
||||
users.password_column = u.password;
|
||||
users.userid_column = u.id;
|
||||
|
||||
@@ -54,6 +54,7 @@ broken_sasl_auth_clients = yes
|
||||
#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>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
# for Froxlor and AWStats to work together
|
||||
# you have to change the following line
|
||||
|
||||
# look for
|
||||
DirData="/some/folder/"
|
||||
|
||||
# and comment this out with a hash (#)
|
||||
#DirData="/some/folder/"
|
||||
@@ -3,7 +3,7 @@ protocols = imap pop3 <SSLPROTOCOLS>
|
||||
listen = *
|
||||
mail_access_groups = vmail
|
||||
mail_debug = no
|
||||
## Uncomment this line to allow Plaintext Logins from foreign IP if the Connection doesn't use TLS
|
||||
## allow Plaintext Logins from foreign IP if the Connection doesn't use TLS
|
||||
disable_plaintext_auth = no
|
||||
|
||||
### SSL Settings
|
||||
@@ -20,13 +20,13 @@ protocol imap {
|
||||
}
|
||||
|
||||
protocol pop3 {
|
||||
# Uncomment this line if you are migrating from Courier also see Migration from Courier
|
||||
# leave this uncommented if you are migrating from Courier also see Migration from Courier
|
||||
pop3_uidl_format = UID%u-%v
|
||||
mail_plugins = quota
|
||||
|
||||
}
|
||||
protocol lda {
|
||||
# postmaster is the one in charge of the mail system. MUST be set to a vailid address!
|
||||
# postmaster is the one in charge of the mail system. MUST be set to a valid address!
|
||||
postmaster_address = <postmaster-address>
|
||||
auth_socket_path = /var/run/dovecot/auth-master
|
||||
mail_plugins = quota
|
||||
|
||||
@@ -8,9 +8,9 @@ shadow.where_clause = ;
|
||||
shadow.userid_column = u.id;
|
||||
shadow.user_column = u.username;
|
||||
shadow.password_column = u.password;
|
||||
shadow.lastchange_column = UNIX_TIMESTAMP()-10;
|
||||
shadow.min_column = 1;
|
||||
shadow.max_column = 2;
|
||||
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;
|
||||
|
||||
@@ -4,7 +4,7 @@ users.database = <SQL_DB>;
|
||||
users.db_user = <SQL_UNPRIVILEGED_USER>;
|
||||
users.db_password = <SQL_UNPRIVILEGED_PASSWORD>;
|
||||
users.table = ftp_users u;
|
||||
users.where_clause =;
|
||||
users.where_clause = u.login_enabled = 'Y';
|
||||
users.user_column = u.username;
|
||||
users.password_column = u.password;
|
||||
users.userid_column = u.id;
|
||||
|
||||
@@ -47,6 +47,7 @@ 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>
|
||||
|
||||
@@ -87,7 +87,7 @@ TransferLog /var/log/proftpd/xferlog
|
||||
SystemLog /var/log/proftpd/proftpd.log
|
||||
|
||||
<IfModule mod_quotatab.c>
|
||||
QuotaEngine off
|
||||
QuotaEngine on
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_ratio.c>
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
# for Froxlor and AWStats to work together
|
||||
# you have to comment out the following
|
||||
# variables
|
||||
|
||||
# look for
|
||||
LogFile=""
|
||||
LogType=""
|
||||
LogFormat=""
|
||||
LogSeparator=""
|
||||
SiteDomain=""
|
||||
DirData="/some/folder/"
|
||||
|
||||
# and comment this out with a hash (#)
|
||||
#LogFile=""
|
||||
#LogType=""
|
||||
#LogFormat=""
|
||||
#LogSeparator=""
|
||||
#SiteDomain=""
|
||||
#DirData="/some/folder/"
|
||||
20
templates/misc/configfiles/freebsd/libnss/etc_nsswitch.conf
Normal file
20
templates/misc/configfiles/freebsd/libnss/etc_nsswitch.conf
Normal file
@@ -0,0 +1,20 @@
|
||||
# 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
|
||||
@@ -0,0 +1,2 @@
|
||||
username <SQL_UNPRIVILEGED_USER>
|
||||
password <SQL_UNPRIVILEGED_PASSWORD>
|
||||
@@ -0,0 +1,18 @@
|
||||
getpwnam SELECT username, 'x', uid, gid, '0', '', 'MySQL User', homedir, shell, '0' FROM ftp_users WHERE username='%1$s' AND login_enabled = 'Y' LIMIT 1
|
||||
getpwuid SELECT username, 'x', uid, gid, '0', '', 'MySQL User', homedir, shell, '0' FROM ftp_users WHERE uid='%1$u' AND login_enabled = 'Y' LIMIT 1
|
||||
getpwent SELECT username, 'x', uid, gid, '0', '', 'MySQL User', homedir, shell, '0' FROM ftp_users
|
||||
getspnam SELECT username, password, '12345', '0', '99999', '7', '', '', '' FROM ftp_users WHERE username='%1$s' LIMIT 1
|
||||
getspent SELECT username, password, '12345', '0', '99999', '7', '', '', '' FROM ftp_users
|
||||
getgrnam SELECT groupname, '', gid FROM ftp_groups WHERE groupname='%1$s' LIMIT 1
|
||||
getgrgid SELECT groupname, '', gid FROM ftp_groups WHERE gid='%1$u' LIMIT 1
|
||||
getgrent SELECT groupname, '', gid FROM ftp_groups
|
||||
memsbygid SELECT username FROM ftp_users WHERE gid='%1$u'
|
||||
gidsbymem SELECT gid FROM ftp_users WHERE username='%1$s'
|
||||
|
||||
host <SQL_HOST>
|
||||
database <SQL_DB>
|
||||
username <SQL_UNPRIVILEGED_USER>
|
||||
password <SQL_UNPRIVILEGED_PASSWORD>
|
||||
port 3306
|
||||
timeout 10
|
||||
compress 0
|
||||
@@ -73,6 +73,7 @@ virtual_transport = virtual
|
||||
#virtual_transport = dovecot
|
||||
#dovecot_destination_recipient_limit = 1
|
||||
#alias_maps = $alias_database
|
||||
#smtpd_sasl_path = private/auth
|
||||
|
||||
queue_directory = /var/spool/postfix
|
||||
command_directory = /usr/local/sbin
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
# for Froxlor and AWStats to work together
|
||||
# you have to change the following line
|
||||
|
||||
# look for
|
||||
DirData="/some/folder/"
|
||||
|
||||
# and comment this out with a hash (#)
|
||||
#DirData="/some/folder/"
|
||||
@@ -3,7 +3,7 @@ protocols = imap pop3 <SSLPROTOCOLS>
|
||||
listen = *
|
||||
mail_access_groups = vmail
|
||||
mail_debug = no
|
||||
## Uncomment this line to allow Plaintext Logins from foreign IP if the Connection doesn't use TLS
|
||||
## allow Plaintext Logins from foreign IP if the Connection doesn't use TLS
|
||||
disable_plaintext_auth = no
|
||||
|
||||
### SSL Settings
|
||||
@@ -20,13 +20,13 @@ protocol imap {
|
||||
}
|
||||
|
||||
protocol pop3 {
|
||||
# Uncomment this line if you are migrating from Courier also see Migration from Courier
|
||||
# leave this uncommented if you are migrating from Courier also see Migration from Courier
|
||||
pop3_uidl_format = UID%u-%v
|
||||
mail_plugins = quota
|
||||
|
||||
}
|
||||
protocol lda {
|
||||
# postmaster is the one in charge of the mail system. MUST be set to a vailid address!
|
||||
# postmaster is the one in charge of the mail system. MUST be set to a valid address!
|
||||
postmaster_address = <postmaster-address>
|
||||
auth_socket_path = /var/run/dovecot/auth-master
|
||||
mail_plugins = quota
|
||||
|
||||
@@ -1,18 +1,21 @@
|
||||
getpwnam SELECT username,'x',uid,gid,'MySQL User',homedir,shell \
|
||||
FROM ftp_users \
|
||||
WHERE username='%1$s' \
|
||||
AND login_enabled = 'Y' \
|
||||
LIMIT 1
|
||||
getpwuid SELECT username,'x',uid,gid,'MySQL User',homedir,shell \
|
||||
FROM ftp_users \
|
||||
WHERE uid='%1$u' \
|
||||
AND login_enabled = 'Y' \
|
||||
LIMIT 1
|
||||
getspnam SELECT username,password,UNIX_TIMESTAMP()-10,'1','2','7','-1','-1','0' \
|
||||
getspnam SELECT username,password,FLOOR(UNIX_TIMESTAMP()/86400-1),'1','99999','7','-1','-1','0' \
|
||||
FROM ftp_users \
|
||||
WHERE username='%1$s' \
|
||||
AND login_enabled = 'Y' \
|
||||
LIMIT 1
|
||||
getpwent SELECT username,'x',uid,gid,'MySQL User',homedir,shell \
|
||||
FROM ftp_users
|
||||
getspent SELECT username,password,UNIX_TIMESTAMP()-10,'1','2','7','-1','-1','0' \
|
||||
getspent SELECT username,password,FLOOR(UNIX_TIMESTAMP()/86400-1),'1','99999','7','-1','-1','0' \
|
||||
FROM ftp_users
|
||||
getgrnam SELECT groupname,'x',gid \
|
||||
FROM ftp_groups \
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
# for Froxlor and AWStats to work together
|
||||
# you have to change the following line
|
||||
|
||||
# look for
|
||||
DirData="/some/folder/"
|
||||
|
||||
# and comment this out with a hash (#)
|
||||
#DirData="/some/folder/"
|
||||
@@ -1,8 +0,0 @@
|
||||
# for Froxlor and AWStats to work together
|
||||
# you have to change the following line
|
||||
|
||||
# look for
|
||||
DirData="/some/folder/"
|
||||
|
||||
# and comment this out with a hash (#)
|
||||
#DirData="/some/folder/"
|
||||
@@ -8,9 +8,9 @@ shadow.where_clause = ;
|
||||
shadow.userid_column = u.id;
|
||||
shadow.user_column = u.username;
|
||||
shadow.password_column = u.password;
|
||||
shadow.lastchange_column = UNIX_TIMESTAMP()-10;
|
||||
shadow.min_column = 1;
|
||||
shadow.max_column = 2;
|
||||
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;
|
||||
|
||||
@@ -4,7 +4,7 @@ users.database = <SQL_DB>;
|
||||
users.db_user = <SQL_UNPRIVILEGED_USER>;
|
||||
users.db_password = <SQL_UNPRIVILEGED_PASSWORD>;
|
||||
users.table = ftp_users u;
|
||||
users.where_clause =;
|
||||
users.where_clause = u.login_enabled = 'Y';
|
||||
users.user_column = u.username;
|
||||
users.password_column = u.password;
|
||||
users.userid_column = u.id;
|
||||
|
||||
@@ -47,6 +47,7 @@ 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>
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
##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
|
||||
@@ -0,0 +1,13 @@
|
||||
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)
|
||||
@@ -0,0 +1,8 @@
|
||||
#
|
||||
# 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
|
||||
#
|
||||
*/5 * * * * root /usr/bin/php5 -q /var/www/froxlor/scripts/froxlor_master_cronjob.php
|
||||
@@ -0,0 +1,3 @@
|
||||
Syslog yes
|
||||
Domain /etc/postfix/dkim/domains
|
||||
KeyList /etc/postfix/dkim/dkim-keys.conf
|
||||
@@ -0,0 +1,28 @@
|
||||
mechanisms = plain login
|
||||
socket listen {
|
||||
client {
|
||||
path = /var/spool/postfix/private/dovecot-auth
|
||||
mode = 0660
|
||||
user = postfix
|
||||
group = postfix
|
||||
}
|
||||
master {
|
||||
path = /var/run/dovecot/auth-master
|
||||
mode = 0660
|
||||
user = vmail
|
||||
group = vmail
|
||||
}
|
||||
}
|
||||
|
||||
passdb sql {
|
||||
args = /etc/dovecot/dovecot-sql.conf
|
||||
}
|
||||
|
||||
userdb prefetch {
|
||||
}
|
||||
|
||||
userdb sql {
|
||||
args = /etc/dovecot/dovecot-sql.conf
|
||||
}
|
||||
|
||||
user = vmail
|
||||
@@ -0,0 +1,43 @@
|
||||
# Some general options
|
||||
protocols = imap pop3 imaps pop3s managesieve
|
||||
mail_access_groups = vmail
|
||||
## allow Plaintext Logins from foreign IP if the Connection doesn't use TLS
|
||||
disable_plaintext_auth = no
|
||||
ssl = yes
|
||||
ssl_cert_file = /etc/ssl/certs/ssl-mail.pem
|
||||
ssl_key_file = /etc/ssl/private/ssl-mail.key
|
||||
ssl_cipher_list = ALL:!LOW:!SSLv2:ALL:!aNULL:!ADH:!eNULL:!EXP:RC4+RSA:+HIGH:+MEDIUM
|
||||
mail_location = maildir:~/Maildir
|
||||
auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@
|
||||
|
||||
# IMAP configuration
|
||||
protocol imap {
|
||||
mail_plugins = quota imap_quota
|
||||
mail_max_userip_connections = 10
|
||||
imap_client_workarounds = outlook-idle delay-newmail
|
||||
}
|
||||
|
||||
# POP3 configuration
|
||||
protocol pop3 {
|
||||
mail_max_userip_connections = 10
|
||||
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
|
||||
pop3_uidl_format = UID%u-%v
|
||||
mail_plugins = quota
|
||||
}
|
||||
|
||||
# LDA configuration
|
||||
protocol lda {
|
||||
# postmaster is the one in charge of the mail system. MUST be set to a valid address!
|
||||
postmaster_address = <postmaster-address>
|
||||
mail_plugins = cmusieve quota
|
||||
quota_full_tempfail = yes
|
||||
deliver_log_format = msgid=%m: %$
|
||||
rejection_reason = Your message to <%t> was automatically rejected:%n%r
|
||||
}
|
||||
|
||||
# Plugins configuration
|
||||
plugin {
|
||||
quota = maildir
|
||||
sieve=~/.dovecot.sieve
|
||||
sieve_dir=~/sieve
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
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'
|
||||
user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir, maildir) AS mail, uid, gid, CONCAT('maildir:storage=', (quota*1024)) as quota FROM mail_users WHERE username = '%u' OR email = '%u'
|
||||
@@ -0,0 +1,125 @@
|
||||
### 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
|
||||
@@ -0,0 +1,30 @@
|
||||
### 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
|
||||
@@ -0,0 +1,20 @@
|
||||
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
|
||||
@@ -0,0 +1,12 @@
|
||||
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
|
||||
@@ -0,0 +1,13 @@
|
||||
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
|
||||
@@ -0,0 +1,16 @@
|
||||
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.id;
|
||||
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;
|
||||
@@ -0,0 +1,24 @@
|
||||
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.id;
|
||||
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;
|
||||
@@ -0,0 +1,20 @@
|
||||
# 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
|
||||
@@ -0,0 +1,56 @@
|
||||
###############################################################################
|
||||
# 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_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" => "<CUSTOMER_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"
|
||||
@@ -0,0 +1,77 @@
|
||||
## 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 = <SERVERNAME>
|
||||
|
||||
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,
|
||||
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
|
||||
# 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
|
||||
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_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
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
user = <SQL_UNPRIVILEGED_USER>
|
||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
||||
dbname = <SQL_DB>
|
||||
table = mail_virtual
|
||||
select_field = destination
|
||||
where_field = email
|
||||
additional_conditions = and TRIM(destination) <> ''
|
||||
hosts = <SQL_HOST>
|
||||
@@ -0,0 +1,8 @@
|
||||
user = <SQL_UNPRIVILEGED_USER>
|
||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
||||
dbname = <SQL_DB>
|
||||
table = panel_domains
|
||||
select_field = domain
|
||||
where_field = domain
|
||||
additional_conditions = and isemaildomain = '1'
|
||||
hosts = <SQL_HOST>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user