Merging my branch and d00ps branches to trunk
This commit is contained in:
56
TODO
56
TODO
@@ -11,11 +11,11 @@ FIXED 0001269 AWStats RewriteRule is wrong
|
|||||||
WONFIX 0001278 Customer and domain directories are not created
|
WONFIX 0001278 Customer and domain directories are not created
|
||||||
FIXED 0001277 Apache Redirect => permanent 301
|
FIXED 0001277 Apache Redirect => permanent 301
|
||||||
FIXED 0001276 Bind Zones Not Updated on Nameserver Change
|
FIXED 0001276 Bind Zones Not Updated on Nameserver Change
|
||||||
0001275 Setting up Traffic limit is limited to 999 GB
|
FIXED 0001275 Setting up Traffic limit is limited to 999 GB
|
||||||
0001273 APS-Installer
|
FIXED 0001273 APS-Installer
|
||||||
0001271 cant install the package magento
|
FIXED 0001271 cant install the package magento
|
||||||
0001270 xinet reltime update mistake
|
FIXED 0001270 xinet reltime update mistake
|
||||||
0001268 SysCP Funktion: aktualisierung in Real-Time
|
FIXED 0001268 SysCP Funktion: aktualisierung in Real-Time
|
||||||
0001041 Customer should have access to his webserver logs.
|
0001041 Customer should have access to his webserver logs.
|
||||||
0001267 Domain-Aliases also create a HOST-entry
|
0001267 Domain-Aliases also create a HOST-entry
|
||||||
0001266 Lighttpd has a internal limit of regex-hits which limits max amount of domain-aliases
|
0001266 Lighttpd has a internal limit of regex-hits which limits max amount of domain-aliases
|
||||||
@@ -32,12 +32,12 @@ WONTFIX 0001258 Make invoices immediately
|
|||||||
0001236 the cron doesnt delete user directories
|
0001236 the cron doesnt delete user directories
|
||||||
0001244 customer view too wide for 1024x768 resolutions
|
0001244 customer view too wide for 1024x768 resolutions
|
||||||
0001229 subdomains and Own vHost-Settings
|
0001229 subdomains and Own vHost-Settings
|
||||||
0001254 Installation no next button
|
FIXED 0001254 Installation no next button
|
||||||
FIXED 0001253 admin_customers.php line 803 / 804 contain the same
|
FIXED 0001253 admin_customers.php line 803 / 804 contain the same
|
||||||
0001252 Backup Cronjob for Customers
|
WONTFIX 0001252 Backup Cronjob for Customers
|
||||||
0001250 Apache redirect to Umlautdomains does not work
|
FIXED 0001250 Apache redirect to Umlautdomains does not work
|
||||||
0001251 possibility to manage WebDAV config in SysCP
|
0001251 possibility to manage WebDAV config in SysCP
|
||||||
0001249 SysCP SVN(!) settings loader doesn't load some settings
|
FIXED 0001249 SysCP SVN(!) settings loader doesn't load some settings
|
||||||
WONTFIX 0001248 blog.syscp.org
|
WONTFIX 0001248 blog.syscp.org
|
||||||
0001042 Webalizer dir should not be deletable
|
0001042 Webalizer dir should not be deletable
|
||||||
0001247 tab order problems at email forward mask
|
0001247 tab order problems at email forward mask
|
||||||
@@ -46,19 +46,19 @@ FIXED 0001246 wrong variable assigned in /templates/admin/customers/custom
|
|||||||
0001156 Repairing use of awstats and awstats-icons with fcgi
|
0001156 Repairing use of awstats and awstats-icons with fcgi
|
||||||
0001243 Wrong uid and gid for php-fcgi-starter
|
0001243 Wrong uid and gid for php-fcgi-starter
|
||||||
0001242 When email qouta is enabled, you cannot add more resources to a client.
|
0001242 When email qouta is enabled, you cannot add more resources to a client.
|
||||||
0001241 Patch for facilate customizing syscp
|
WONTIFX 0001241 Patch for facilate customizing syscp
|
||||||
0001240 Wrong php.ini for subdomains with fastCGI
|
0001240 Wrong php.ini for subdomains with fastCGI
|
||||||
0001239 awstats configs get cluttered up after domain deletion
|
FIXED 0001239 awstats configs get cluttered up after domain deletion
|
||||||
0001228 Domain deletion fails
|
FIXED 0001228 Domain deletion fails
|
||||||
0001233 Display errors when amount of FTP or Mail Traffic is larger than HTTP traffic
|
FIXED 0001233 Display errors when amount of FTP or Mail Traffic is larger than HTTP traffic
|
||||||
WONTFIX 0001227 Error on fixing invoices with credit notes
|
WONTFIX 0001227 Error on fixing invoices with credit notes
|
||||||
0001122 Field members of table ftp_groups not updated correctly when customer deletes ftp user
|
FIXED 0001122 Field members of table ftp_groups not updated correctly when customer deletes ftp user
|
||||||
FIXED 0001215 php.ini: open_basedir error
|
FIXED 0001215 php.ini: open_basedir error
|
||||||
0001224 APS installer not installing the aps applications properly, such as WordPress and WebCalender
|
0001224 APS installer not installing the aps applications properly, such as WordPress and WebCalender
|
||||||
0001223 Postfix proposed SQL-query in mysql-virtual_alias_maps.cf: use TRIM()
|
FIXED 0001223 Postfix proposed SQL-query in mysql-virtual_alias_maps.cf: use TRIM()
|
||||||
0001221 syscp xinet.d - no need to edit /etc/services
|
FIXED 0001221 syscp xinet.d - no need to edit /etc/services
|
||||||
0001217 SysCP Realtime Support
|
FIXED 0001217 SysCP Realtime Support
|
||||||
0001209 APS crashs when installing magento
|
FIXED 0001209 APS crashs when installing magento
|
||||||
0001017 Proftpd - Quota should be added
|
0001017 Proftpd - Quota should be added
|
||||||
0001016 Pureftpd - quota should be added
|
0001016 Pureftpd - quota should be added
|
||||||
0001206 crontabs not terminating
|
0001206 crontabs not terminating
|
||||||
@@ -70,36 +70,36 @@ FIXED 0001215 php.ini: open_basedir error
|
|||||||
0001207 FTP Passw<73>rter mit Umlauten
|
0001207 FTP Passw<73>rter mit Umlauten
|
||||||
0001201 Virtualusers conflict with local users when using libnss-mysql
|
0001201 Virtualusers conflict with local users when using libnss-mysql
|
||||||
0001204 php5-suhosin
|
0001204 php5-suhosin
|
||||||
0001203 Add check for PHP version and required PHP modules in install script
|
FIXED 0001203 Add check for PHP version and required PHP modules in install script
|
||||||
0001198 More online help wanted
|
0001198 More online help wanted
|
||||||
0001039 Additional text field for infos in customers "Contact Data"
|
0001039 Additional text field for infos in customers "Contact Data"
|
||||||
WONTFIX 0001187 additional Invoices
|
WONTFIX 0001187 additional Invoices
|
||||||
WONTFIX 0001059 Billing - Create contract - Filename should contain customername
|
WONTFIX 0001059 Billing - Create contract - Filename should contain customername
|
||||||
FIXED 0001013 lighttpd - every customer should have his own php.ini
|
FIXED 0001013 lighttpd - every customer should have his own php.ini
|
||||||
0001189 Autoresponder: support for multiline "From:" headers
|
0001189 Autoresponder: support for multiline "From:" headers
|
||||||
0001113 realtime functionality broken
|
FIXED 0001113 realtime functionality broken
|
||||||
0001186 subdomains and php configuration
|
0001186 subdomains and php configuration
|
||||||
0001112 customers should be able to create custom cronjobs
|
0001112 customers should be able to create custom cronjobs
|
||||||
0001079 Protected dir only works only after a force-reload on lighttpd
|
0001079 Protected dir only works only after a force-reload on lighttpd
|
||||||
0001080 host of third level gets overridden by second-level when wwwserveralias is not set on lighttpd
|
FIXED 0001080 host of third level gets overridden by second-level when wwwserveralias is not set on lighttpd
|
||||||
0001159 serveral errors for lighttpd
|
0001159 serveral errors for lighttpd
|
||||||
0001181 lighttpd cronjob config for subdomains is empty
|
FIXED 0001181 lighttpd cronjob config for subdomains is empty
|
||||||
0001034 Cron-Tasks: apache-logfiles directory
|
0001034 Cron-Tasks: apache-logfiles directory
|
||||||
0001136 Configuration of "dead" mail adresses
|
0001136 Configuration of "dead" mail adresses
|
||||||
0001176 libnss-mysql and conflicting usernames/groups
|
0001176 libnss-mysql and conflicting usernames/groups
|
||||||
0001154 Wrong configuration set with AWstats an fcgi
|
FIXED 0001154 Wrong configuration set with AWstats an fcgi
|
||||||
0001150 Wrong configuration of awstats
|
0001150 Wrong configuration of awstats
|
||||||
0001083 awstats.model.conf.syscp should include awstats.conf
|
0001083 awstats.model.conf.syscp should include awstats.conf
|
||||||
0001152 apache certificate is not generated
|
0001152 apache certificate is not generated
|
||||||
0001151 When cronjob generates new dkim files a mail is sent to root
|
0001151 When cronjob generates new dkim files a mail is sent to root
|
||||||
0001149 Create a Configuration-Option for SPF Records in Zonefiles
|
FIXED 0001149 Create a Configuration-Option for SPF Records in Zonefiles
|
||||||
0001148 Show info for inactive modifications
|
0001148 Show info for inactive modifications
|
||||||
0001005 Force user to add POP3 Account before he can add e-mail adresses
|
0001005 Force user to add POP3 Account before he can add e-mail adresses
|
||||||
0001142 Default index.html should be placed in a sub-directory of a domain.
|
0001142 Default index.html should be placed in a sub-directory of a domain.
|
||||||
0001140 Replace variables in defaut_vhost config
|
0001140 Replace variables in defaut_vhost config
|
||||||
0001138 old db-data is lost when mysqldump is not within open_basedir
|
0001138 old db-data is lost when mysqldump is not within open_basedir
|
||||||
0001135 dkim refers to non-existing domainkey entry in DNS zone file.
|
0001135 dkim refers to non-existing domainkey entry in DNS zone file.
|
||||||
0001134 Allow selection of a default apache page / provide access to syscp
|
WONTFIX 0001134 Allow selection of a default apache page / provide access to syscp
|
||||||
0001133 Default Configuration doesn't allow Exim4 to forward Mails to the outside world
|
0001133 Default Configuration doesn't allow Exim4 to forward Mails to the outside world
|
||||||
0001128 More targets for "Write a message" tool
|
0001128 More targets for "Write a message" tool
|
||||||
0001131 Add FreeBSD configuration files to the base tarball.
|
0001131 Add FreeBSD configuration files to the base tarball.
|
||||||
@@ -110,10 +110,10 @@ FIXED 0001013 lighttpd - every customer should have his own php.ini
|
|||||||
0001114 Password query for Awstats statistics
|
0001114 Password query for Awstats statistics
|
||||||
0001111 add login for e-mail and ftp users to let them change their own settings
|
0001111 add login for e-mail and ftp users to let them change their own settings
|
||||||
0001109 no mail traffic is shown and calculated without third party module
|
0001109 no mail traffic is shown and calculated without third party module
|
||||||
0001104 Listen Configuration should contain a warning for debian
|
WONTFIX 0001104 Listen Configuration should contain a warning for debian
|
||||||
0001101 Default mail qouta - possibillity to set new accounts to amount of webspace
|
0001101 Default mail qouta - possibillity to set new accounts to amount of webspace
|
||||||
WONTFIX 0001098 Possibillity to dissable "Catchall" for mails
|
WONTFIX 0001098 Possibillity to dissable "Catchall" for mails
|
||||||
0001095 lighttpd - redirection - "/" slash is added to end of url
|
FIXED 0001095 lighttpd - redirection - "/" slash is added to end of url
|
||||||
0001084 Add select box to change special logfile setting on domain edit
|
0001084 Add select box to change special logfile setting on domain edit
|
||||||
0001051 include_shell issue in lighttpd 1.4.20
|
0001051 include_shell issue in lighttpd 1.4.20
|
||||||
0001058 Add id/class attributs in <img> tag (left navigation)
|
0001058 Add id/class attributs in <img> tag (left navigation)
|
||||||
@@ -121,4 +121,4 @@ WONTFIX 0001098 Possibillity to dissable "Catchall" for mails
|
|||||||
0001035 PHP-Error-Log | Adminpanel & CronTask
|
0001035 PHP-Error-Log | Adminpanel & CronTask
|
||||||
WONTFIX 0001033 Cron-Tasks: creating of php.ini
|
WONTFIX 0001033 Cron-Tasks: creating of php.ini
|
||||||
0001010 Send info mail to customer if webspace is exceeded
|
0001010 Send info mail to customer if webspace is exceeded
|
||||||
0001004 Ressources / Domains - Standard subdomains should be separrated from normal Domains
|
0001004 Ressources / Domains - Standard subdomains should be separrated from normal Domains
|
||||||
|
|||||||
44
actions/admin/settings/185.spf.php
Normal file
44
actions/admin/settings/185.spf.php
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file is part of the Froxlor project.
|
||||||
|
* Copyright (c) 2009-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.syscp.org/misc/COPYING.txt
|
||||||
|
*
|
||||||
|
* @copyright (c) the authors
|
||||||
|
* @author Michael Kaufmann <d00p@froxlor.org>
|
||||||
|
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
* @package Panel
|
||||||
|
* @version $Id:$
|
||||||
|
*/
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'groups' => array(
|
||||||
|
'spf' => array(
|
||||||
|
'title' => $lng['admin']['spfsettings'],
|
||||||
|
'fields' => array(
|
||||||
|
'spf_enabled' => array(
|
||||||
|
'label' => $lng['spf']['use_spf'],
|
||||||
|
'settinggroup' => 'spf',
|
||||||
|
'varname' => 'use_spf',
|
||||||
|
'type' => 'bool',
|
||||||
|
'default' => false,
|
||||||
|
'save_method' => 'storeSettingField'
|
||||||
|
),
|
||||||
|
'spf_entry' => array(
|
||||||
|
'label' => $lng['spf']['spf_entry'],
|
||||||
|
'settinggroup' => 'spf',
|
||||||
|
'varname' => 'spf_entry',
|
||||||
|
'type' => 'string',
|
||||||
|
'default' => '@ IN TXT "v=spf1 a mx -all"',
|
||||||
|
'save_method' => 'storeSettingField'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
?>
|
||||||
@@ -94,7 +94,8 @@ if($userinfo['change_serversettings'] == '1')
|
|||||||
'<VIRTUAL_UID_MAPS>' => $settings['system']['vmail_uid'],
|
'<VIRTUAL_UID_MAPS>' => $settings['system']['vmail_uid'],
|
||||||
'<VIRTUAL_GID_MAPS>' => $settings['system']['vmail_gid'],
|
'<VIRTUAL_GID_MAPS>' => $settings['system']['vmail_gid'],
|
||||||
'<AWSTATS_PATH>' => $settings['system']['awstats_path'],
|
'<AWSTATS_PATH>' => $settings['system']['awstats_path'],
|
||||||
'<SSLPROTOCOLS>' => ($settings['system']['use_ssl'] == '1') ? 'imaps pop3s' : ''
|
'<SSLPROTOCOLS>' => ($settings['system']['use_ssl'] == '1') ? 'imaps pop3s' : '',
|
||||||
|
'<REALTIME_PORT>' => $settings['system']['realtime_port']
|
||||||
);
|
);
|
||||||
$files = '';
|
$files = '';
|
||||||
$configpage = '';
|
$configpage = '';
|
||||||
|
|||||||
@@ -246,12 +246,10 @@ if($page == 'customers'
|
|||||||
{
|
{
|
||||||
$name = validate($_POST['name'], 'name');
|
$name = validate($_POST['name'], 'name');
|
||||||
$firstname = validate($_POST['firstname'], 'first name');
|
$firstname = validate($_POST['firstname'], 'first name');
|
||||||
$title = validate($_POST['title'], 'title');
|
|
||||||
$company = validate($_POST['company'], 'company');
|
$company = validate($_POST['company'], 'company');
|
||||||
$street = validate($_POST['street'], 'street');
|
$street = validate($_POST['street'], 'street');
|
||||||
$zipcode = validate($_POST['zipcode'], 'zipcode', '/^[0-9 \-A-Z]*$/');
|
$zipcode = validate($_POST['zipcode'], 'zipcode', '/^[0-9 \-A-Z]*$/');
|
||||||
$city = validate($_POST['city'], 'city');
|
$city = validate($_POST['city'], 'city');
|
||||||
$country = validate($_POST['country'], 'country');
|
|
||||||
$phone = validate($_POST['phone'], 'phone', '/^[0-9\- \+\(\)\/]*$/');
|
$phone = validate($_POST['phone'], 'phone', '/^[0-9\- \+\(\)\/]*$/');
|
||||||
$fax = validate($_POST['fax'], 'fax', '/^[0-9\- \+\(\)\/]*$/');
|
$fax = validate($_POST['fax'], 'fax', '/^[0-9\- \+\(\)\/]*$/');
|
||||||
$email = $idna_convert->encode(validate($_POST['email'], 'email'));
|
$email = $idna_convert->encode(validate($_POST['email'], 'email'));
|
||||||
@@ -442,37 +440,6 @@ if($page == 'customers'
|
|||||||
$guid = intval($settings['system']['lastguid']) + 1;
|
$guid = intval($settings['system']['lastguid']) + 1;
|
||||||
$documentroot = makeCorrectDir($settings['system']['documentroot_prefix'] . '/' . $loginname);
|
$documentroot = makeCorrectDir($settings['system']['documentroot_prefix'] . '/' . $loginname);
|
||||||
|
|
||||||
if($service_active == 1)
|
|
||||||
{
|
|
||||||
$service_active = '1';
|
|
||||||
|
|
||||||
if(!isset($servicestart_date)
|
|
||||||
|| $servicestart_date == '0000-00-00')
|
|
||||||
{
|
|
||||||
$servicestart_date = date('Y-m-d');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$service_active = '0';
|
|
||||||
$servicestart_date = '0000-00-00';
|
|
||||||
}
|
|
||||||
|
|
||||||
if($calc_tax != '1')
|
|
||||||
{
|
|
||||||
$calc_tax = '0';
|
|
||||||
}
|
|
||||||
|
|
||||||
if($interval_payment != '1')
|
|
||||||
{
|
|
||||||
$interval_payment = '0';
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!isset($lng['customer']['payment_methods'][$payment_method]))
|
|
||||||
{
|
|
||||||
$payment_method = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(file_exists($documentroot))
|
if(file_exists($documentroot))
|
||||||
{
|
{
|
||||||
standard_error('documentrootexists', $documentroot);
|
standard_error('documentrootexists', $documentroot);
|
||||||
@@ -493,7 +460,7 @@ if($page == 'customers'
|
|||||||
$password = substr(md5(uniqid(microtime(), 1)), 12, 6);
|
$password = substr(md5(uniqid(microtime(), 1)), 12, 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $db->query("INSERT INTO `" . TABLE_PANEL_CUSTOMERS . "` (`adminid`, `loginname`, `password`, `name`, `firstname`, `title`, `company`, `street`, `zipcode`, `city`, `country`, `phone`, `fax`, `email`, `customernumber`, `def_language`, `documentroot`, `guid`, `diskspace`, `traffic`, `subdomains`, `emails`, `email_accounts`, `email_forwarders`, `email_quota`, `ftps`, `tickets`, `mysqls`, `standardsubdomain`, `phpenabled`, `imap`, `pop3`, `contract_date`, `contract_number`, `taxid`, `included_domains_qty`, `included_domains_tld`, `additional_traffic_fee`, `additional_traffic_unit`,`additional_diskspace_fee`, `additional_diskspace_unit`, `interval_fee`, `interval_length`, `interval_type`, `interval_payment`, `setup_fee`, `taxclass`, `service_active`, `servicestart_date`, `term_of_payment`, `calc_tax`, `payment_every`, `payment_method`, `bankaccount_holder`, `bankaccount_number`, `bankaccount_blz`, `bankaccount_bank`, `additional_service_description`, `aps_packages`) VALUES ('" . (int)$userinfo['adminid'] . "', '" . $db->escape($loginname) . "', '" . md5($password) . "', '" . $db->escape($name) . "', '" . $db->escape($firstname) . "', '" . $db->escape($title) . "', '" . $db->escape($company) . "', '" . $db->escape($street) . "', '" . $db->escape($zipcode) . "', '" . $db->escape($city) . "', '" . $db->escape($country) . "', '" . $db->escape($phone) . "', '" . $db->escape($fax) . "', '" . $db->escape($email) . "', '" . $db->escape($customernumber) . "','" . $db->escape($def_language) . "', '" . $db->escape($documentroot) . "', '" . $db->escape($guid) . "', '" . $db->escape($diskspace) . "', '" . $db->escape($traffic) . "', '" . $db->escape($subdomains) . "', '" . $db->escape($emails) . "', '" . $db->escape($email_accounts) . "', '" . $db->escape($email_forwarders) . "', '" . $db->escape($email_quota) . "', '" . $db->escape($ftps) . "', '" . $db->escape($tickets) . "', '" . $db->escape($mysqls) . "', '0', '" . $db->escape($phpenabled) . "', '" . $db->escape($email_imap) . "', '" . $db->escape($email_pop3) . "', '" . $db->escape($contract_date) . "', '" . $db->escape($contract_number) . "', '" . $db->escape($taxid) . "', '" . $db->escape($included_domains_qty) . "', '" . $db->escape($included_domains_tld) . "', '" . $db->escape($additional_traffic_fee) . "', '" . $db->escape($additional_traffic_unit) . "','" . $db->escape($additional_diskspace_fee) . "', '" . $db->escape($additional_diskspace_unit) . "','" . $db->escape($interval_fee) . "', '" . $db->escape($interval_length) . "', '" . $db->escape($interval_type) . "', '" . $db->escape($interval_payment) . "', '" . $db->escape($setup_fee) . "', '" . $db->escape($taxclass) . "', '" . $db->escape($service_active) . "', '" . $db->escape($servicestart_date) . "', '" . $db->escape($term_of_payment) . "', '" . $db->escape($calc_tax) . "', '" . $db->escape($payment_every) . "', '" . $db->escape($payment_method) . "', '" . $db->escape($bankaccount_holder) . "', '" . $db->escape($bankaccount_number) . "', '" . $db->escape($bankaccount_blz) . "', '" . $db->escape($bankaccount_bank) . "', '" . $db->escape($additional_service_description) . "', " . (int)$number_of_aps_packages . ")");
|
$result = $db->query("INSERT INTO `" . TABLE_PANEL_CUSTOMERS . "` (`adminid`, `loginname`, `password`, `name`, `firstname`, `company`, `street`, `zipcode`, `city`, `phone`, `fax`, `email`, `customernumber`, `def_language`, `documentroot`, `guid`, `diskspace`, `traffic`, `subdomains`, `emails`, `email_accounts`, `email_forwarders`, `email_quota`, `ftps`, `tickets`, `mysqls`, `standardsubdomain`, `phpenabled`, `imap`, `pop3`, `aps_packages`) VALUES ('" . (int)$userinfo['adminid'] . "', '" . $db->escape($loginname) . "', '" . md5($password) . "', '" . $db->escape($name) . "', '" . $db->escape($firstname) . "', '" . $db->escape($company) . "', '" . $db->escape($street) . "', '" . $db->escape($zipcode) . "', '" . $db->escape($city) . "', '" . $db->escape($phone) . "', '" . $db->escape($fax) . "', '" . $db->escape($email) . "', '" . $db->escape($customernumber) . "','" . $db->escape($def_language) . "', '" . $db->escape($documentroot) . "', '" . $db->escape($guid) . "', '" . $db->escape($diskspace) . "', '" . $db->escape($traffic) . "', '" . $db->escape($subdomains) . "', '" . $db->escape($emails) . "', '" . $db->escape($email_accounts) . "', '" . $db->escape($email_forwarders) . "', '" . $db->escape($email_quota) . "', '" . $db->escape($ftps) . "', '" . $db->escape($tickets) . "', '" . $db->escape($mysqls) . "', '0', '" . $db->escape($phpenabled) . "', '" . $db->escape($email_imap) . "', '" . $db->escape($email_pop3) . "', '" . (int)$number_of_aps_packages . "')");
|
||||||
$customerid = $db->insert_id();
|
$customerid = $db->insert_id();
|
||||||
$admin_update_query = "UPDATE `" . TABLE_PANEL_ADMINS . "` SET `customers_used` = `customers_used` + 1";
|
$admin_update_query = "UPDATE `" . TABLE_PANEL_ADMINS . "` SET `customers_used` = `customers_used` + 1";
|
||||||
|
|
||||||
@@ -683,12 +650,10 @@ if($page == 'customers'
|
|||||||
{
|
{
|
||||||
$name = validate($_POST['name'], 'name');
|
$name = validate($_POST['name'], 'name');
|
||||||
$firstname = validate($_POST['firstname'], 'first name');
|
$firstname = validate($_POST['firstname'], 'first name');
|
||||||
$title = validate($_POST['title'], 'title');
|
|
||||||
$company = validate($_POST['company'], 'company');
|
$company = validate($_POST['company'], 'company');
|
||||||
$street = validate($_POST['street'], 'street');
|
$street = validate($_POST['street'], 'street');
|
||||||
$zipcode = validate($_POST['zipcode'], 'zipcode', '/^[0-9 \-A-Z]*$/');
|
$zipcode = validate($_POST['zipcode'], 'zipcode', '/^[0-9 \-A-Z]*$/');
|
||||||
$city = validate($_POST['city'], 'city');
|
$city = validate($_POST['city'], 'city');
|
||||||
$country = validate($_POST['country'], 'country');
|
|
||||||
$phone = validate($_POST['phone'], 'phone', '/^[0-9\- \+\(\)\/]*$/');
|
$phone = validate($_POST['phone'], 'phone', '/^[0-9\- \+\(\)\/]*$/');
|
||||||
$fax = validate($_POST['fax'], 'fax', '/^[0-9\- \+\(\)\/]*$/');
|
$fax = validate($_POST['fax'], 'fax', '/^[0-9\- \+\(\)\/]*$/');
|
||||||
$email = $idna_convert->encode(validate($_POST['email'], 'email'));
|
$email = $idna_convert->encode(validate($_POST['email'], 'email'));
|
||||||
@@ -906,7 +871,7 @@ if($page == 'customers'
|
|||||||
$db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET `imap`='" . (int)$email_imap . "' WHERE `customerid`='" . (int)$id . "'");
|
$db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET `imap`='" . (int)$email_imap . "' WHERE `customerid`='" . (int)$id . "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `name`='" . $db->escape($name) . "', `firstname`='" . $db->escape($firstname) . "', `title`='" . $db->escape($title) . "', `company`='" . $db->escape($company) . "', `street`='" . $db->escape($street) . "', `zipcode`='" . $db->escape($zipcode) . "', `city`='" . $db->escape($city) . "', `country`='" . $db->escape($country) . "', `phone`='" . $db->escape($phone) . "', `fax`='" . $db->escape($fax) . "', `email`='" . $db->escape($email) . "', `customernumber`='" . $db->escape($customernumber) . "', `def_language`='" . $db->escape($def_language) . "', `password` = '" . $password . "', `diskspace`='" . $db->escape($diskspace) . "', `traffic`='" . $db->escape($traffic) . "', `subdomains`='" . $db->escape($subdomains) . "', `emails`='" . $db->escape($emails) . "', `email_accounts` = '" . $db->escape($email_accounts) . "', `email_forwarders`='" . $db->escape($email_forwarders) . "', `ftps`='" . $db->escape($ftps) . "', `tickets`='" . $db->escape($tickets) . "', `mysqls`='" . $db->escape($mysqls) . "', `deactivated`='" . $db->escape($deactivated) . "', `phpenabled`='" . $db->escape($phpenabled) . "', `email_quota`='" . $db->escape($email_quota) . "', `imap`='" . $db->escape($email_imap) . "', `pop3`='" . $db->escape($email_pop3) . "', `contract_date`='" . $db->escape($contract_date) . "', `contract_number`='" . $db->escape($contract_number) . "', `taxid`='" . $db->escape($taxid) . "', `included_domains_qty`='" . $db->escape($included_domains_qty) . "', `included_domains_tld`='" . $db->escape($included_domains_tld) . "', `additional_traffic_fee`='" . $db->escape($additional_traffic_fee) . "', `additional_traffic_unit`='" . $db->escape($additional_traffic_unit) . "', `additional_diskspace_fee`='" . $db->escape($additional_diskspace_fee) . "', `additional_diskspace_unit`='" . $db->escape($additional_diskspace_unit) . "', `interval_fee`='" . $db->escape($interval_fee) . "', `interval_length`='" . $db->escape($interval_length) . "', `interval_type`='" . $db->escape($interval_type) . "', `interval_payment`='" . $db->escape($interval_payment) . "', `setup_fee`='" . $db->escape($setup_fee) . "', `taxclass`='" . $db->escape($taxclass) . "', `service_active`='" . $db->escape($service_active) . "', `servicestart_date`='" . $db->escape($servicestart_date) . "', `serviceend_date`='" . $db->escape($serviceend_date) . "', `term_of_payment`='" . $db->escape($term_of_payment) . "', `calc_tax`='" . $db->escape($calc_tax) . "', `payment_every`='" . $db->escape($payment_every) . "', `payment_method`='" . $db->escape($payment_method) . "', `bankaccount_holder`='" . $db->escape($bankaccount_holder) . "', `bankaccount_number`='" . $db->escape($bankaccount_number) . "', `bankaccount_blz`='" . $db->escape($bankaccount_blz) . "', `bankaccount_bank`='" . $db->escape($bankaccount_bank) . "', `additional_service_description`='" . $db->escape($additional_service_description) . "', `aps_packages`=" . (int)$number_of_aps_packages . " WHERE `customerid`='" . (int)$id . "'");
|
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `name`='" . $db->escape($name) . "', `firstname`='" . $db->escape($firstname) . "', `company`='" . $db->escape($company) . "', `street`='" . $db->escape($street) . "', `zipcode`='" . $db->escape($zipcode) . "', `city`='" . $db->escape($city) . "', `phone`='" . $db->escape($phone) . "', `fax`='" . $db->escape($fax) . "', `email`='" . $db->escape($email) . "', `customernumber`='" . $db->escape($customernumber) . "', `def_language`='" . $db->escape($def_language) . "', `password` = '" . $password . "', `diskspace`='" . $db->escape($diskspace) . "', `traffic`='" . $db->escape($traffic) . "', `subdomains`='" . $db->escape($subdomains) . "', `emails`='" . $db->escape($emails) . "', `email_accounts` = '" . $db->escape($email_accounts) . "', `email_forwarders`='" . $db->escape($email_forwarders) . "', `ftps`='" . $db->escape($ftps) . "', `tickets`='" . $db->escape($tickets) . "', `mysqls`='" . $db->escape($mysqls) . "', `deactivated`='" . $db->escape($deactivated) . "', `phpenabled`='" . $db->escape($phpenabled) . "', `email_quota`='" . $db->escape($email_quota) . "', `imap`='" . $db->escape($email_imap) . "', `pop3`='" . $db->escape($email_pop3) . "', `aps_packages`='" . (int)$number_of_aps_packages . "' WHERE `customerid`='" . (int)$id . "'");
|
||||||
$admin_update_query = "UPDATE `" . TABLE_PANEL_ADMINS . "` SET `customers_used` = `customers_used` ";
|
$admin_update_query = "UPDATE `" . TABLE_PANEL_ADMINS . "` SET `customers_used` = `customers_used` ";
|
||||||
|
|
||||||
if($mysqls != '-1'
|
if($mysqls != '-1'
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ if($page == 'overview')
|
|||||||
if((isset($_GET['lookfornewversion']) && $_GET['lookfornewversion'] == 'yes')
|
if((isset($_GET['lookfornewversion']) && $_GET['lookfornewversion'] == 'yes')
|
||||||
|| (isset($lookfornewversion) && $lookfornewversion == 'yes'))
|
|| (isset($lookfornewversion) && $lookfornewversion == 'yes'))
|
||||||
{
|
{
|
||||||
$latestversion = @file('http://version.syscp.org/SysCP/legacy/' . $version . '-' . $dbversion );
|
$latestversion = @file('http://version.froxlor.org/legacy/' . $version);
|
||||||
|
|
||||||
if(is_array($latestversion)
|
if(is_array($latestversion)
|
||||||
&& count($latestversion) >= 2)
|
&& count($latestversion) >= 2)
|
||||||
@@ -103,7 +103,7 @@ if($page == 'overview')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
redirectTo('http://version.syscp.org/SysCP/legacy/' . $version . '-' . $dbversion . '/pretty', NULL);
|
redirectTo('http://version.froxlor.org/legacy/' . $version . '/pretty', NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ if(!is_null($month)
|
|||||||
AND `month` = '" . $month . "'
|
AND `month` = '" . $month . "'
|
||||||
AND `year` = '" . $year . "'");
|
AND `year` = '" . $year . "'");
|
||||||
rsort($row = mysql_fetch_row($result));
|
rsort($row = mysql_fetch_row($result));
|
||||||
$traf['max'] = $row[0];
|
$traf['max'] = ($row[0] > $row[1] ? ($row[0] > $row[2] ? $row[0] : $row[2]) : ($row[1] > $row[2] ? $row[1] : $row[2]));;
|
||||||
$result = $db->query("SELECT
|
$result = $db->query("SELECT
|
||||||
SUM(`http`) as 'http', SUM(`ftp_up`) AS 'ftp_up', SUM(`ftp_down`) as 'ftp_down', SUM(`mail`) as 'mail',
|
SUM(`http`) as 'http', SUM(`ftp_up`) AS 'ftp_up', SUM(`ftp_down`) as 'ftp_down', SUM(`mail`) as 'mail',
|
||||||
`day`, `month`, `year`
|
`day`, `month`, `year`
|
||||||
@@ -185,7 +185,7 @@ else
|
|||||||
WHERE `customerid` = '" . $userinfo['customerid'] . "'
|
WHERE `customerid` = '" . $userinfo['customerid'] . "'
|
||||||
GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12) ORDER BY sum DESC LIMIT 1");
|
GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12) ORDER BY sum DESC LIMIT 1");
|
||||||
$row = $db->fetch_array($result);
|
$row = $db->fetch_array($result);
|
||||||
$traf['max'] = $row['sum'];
|
$traf['max'] = ($row[0] > $row[1] ? ($row[0] > $row[2] ? $row[0] : $row[2]) : ($row[1] > $row[2] ? $row[1] : $row[2]));;
|
||||||
$result = $db->query("SELECT `month`, `year`, SUM(`http`) AS http, SUM(`ftp_up`) AS ftp_up, SUM(`ftp_down`) AS ftp_down, SUM(`mail`) AS mail
|
$result = $db->query("SELECT `month`, `year`, SUM(`http`) AS http, SUM(`ftp_up`) AS ftp_up, SUM(`ftp_down`) AS ftp_down, SUM(`mail`) AS mail
|
||||||
FROM `" . TABLE_PANEL_TRAFFIC . "` WHERE `customerid` = '" . $userinfo['customerid'] . "'
|
FROM `" . TABLE_PANEL_TRAFFIC . "` WHERE `customerid` = '" . $userinfo['customerid'] . "'
|
||||||
GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12");
|
GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12");
|
||||||
|
|||||||
@@ -154,8 +154,8 @@ CREATE TABLE `panel_admins` (
|
|||||||
`tickets_used` int(15) NOT NULL default '0',
|
`tickets_used` int(15) NOT NULL default '0',
|
||||||
`subdomains` int(15) NOT NULL default '0',
|
`subdomains` int(15) NOT NULL default '0',
|
||||||
`subdomains_used` int(15) NOT NULL default '0',
|
`subdomains_used` int(15) NOT NULL default '0',
|
||||||
`traffic` int(15) NOT NULL default '0',
|
`traffic` bigint(30) NOT NULL default '0',
|
||||||
`traffic_used` int(15) NOT NULL default '0',
|
`traffic_used` bigint(30) NOT NULL default '0',
|
||||||
`deactivated` tinyint(1) NOT NULL default '0',
|
`deactivated` tinyint(1) NOT NULL default '0',
|
||||||
`lastlogin_succ` int(11) unsigned NOT NULL default '0',
|
`lastlogin_succ` int(11) unsigned NOT NULL default '0',
|
||||||
`lastlogin_fail` int(11) unsigned NOT NULL default '0',
|
`lastlogin_fail` int(11) unsigned NOT NULL default '0',
|
||||||
@@ -488,7 +488,7 @@ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) V
|
|||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (57, 'system', 'last_archive_run', '000000');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (57, 'system', 'last_archive_run', '000000');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (58, 'ticket', 'enabled', '1');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (58, 'ticket', 'enabled', '1');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (59, 'ticket', 'concurrently_open', '5');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (59, 'ticket', 'concurrently_open', '5');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (60, 'ticket', 'noreply_name', 'SysCP Support');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (60, 'ticket', 'noreply_name', 'Froxlor Support');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (61, 'system', 'mod_fcgid_configdir', '/var/www/php-fcgi-scripts');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (61, 'system', 'mod_fcgid_configdir', '/var/www/php-fcgi-scripts');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (62, 'system', 'mod_fcgid_tmpdir', '/var/customers/tmp');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (62, 'system', 'mod_fcgid_tmpdir', '/var/customers/tmp');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (63, 'ticket', 'reset_cycle', '2');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (63, 'ticket', 'reset_cycle', '2');
|
||||||
@@ -500,7 +500,7 @@ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) V
|
|||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (69, 'logger', 'severity', '1');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (69, 'logger', 'severity', '1');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (70, 'system','ssl_cert_file','/etc/apache2/apache2.pem');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (70, 'system','ssl_cert_file','/etc/apache2/apache2.pem');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (71, 'system','use_ssl','1');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (71, 'system','use_ssl','1');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (72, 'system','openssl_cnf','[ req ]\r\ndefault_bits = 1024\r\ndistinguished_name = req_distinguished_name\r\nattributes = req_attributes\r\nprompt = no\r\noutput_password =\r\ninput_password =\r\n[ req_distinguished_name ]\r\nC = DE\r\nST = syscp\r\nL = syscp \r\nO = Testcertificate\r\nOU = syscp \r\nCN = @@domain_name@@\r\nemailAddress = @@email@@ \r\n[ req_attributes ]\r\nchallengePassword =\r\n');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (72, 'system','openssl_cnf','[ req ]\r\ndefault_bits = 1024\r\ndistinguished_name = req_distinguished_name\r\nattributes = req_attributes\r\nprompt = no\r\noutput_password =\r\ninput_password =\r\n[ req_distinguished_name ]\r\nC = DE\r\nST = froxlor\r\nL = froxlor \r\nO = Testcertificate\r\nOU = froxlor \r\nCN = @@domain_name@@\r\nemailAddress = @@email@@ \r\n[ req_attributes ]\r\nchallengePassword =\r\n');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (73, 'system', 'default_vhostconf', '');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (73, 'system', 'default_vhostconf', '');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (74, 'system', 'mail_quota_enabled', '0');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (74, 'system', 'mail_quota_enabled', '0');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (75, 'system', 'mail_quota', '100');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (75, 'system', 'mail_quota', '100');
|
||||||
@@ -509,7 +509,7 @@ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) V
|
|||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (78, 'system', 'webalizer_enabled', '1');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (78, 'system', 'webalizer_enabled', '1');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (79, 'system', 'awstats_enabled', '0');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (79, 'system', 'awstats_enabled', '0');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (80, 'system', 'awstats_domain_file', '/etc/awstats/');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (80, 'system', 'awstats_domain_file', '/etc/awstats/');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (81, 'system', 'awstats_model_file', '/etc/awstats/awstats.model.conf.syscp');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (81, 'system', 'awstats_model_file', '/etc/awstats/awstats.model.conf.froxlor');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (82, 'dkim', 'dkim_prefix', '/etc/postfix/dkim/');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (82, 'dkim', 'dkim_prefix', '/etc/postfix/dkim/');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (83, 'dkim', 'dkim_domains', 'domains');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (83, 'dkim', 'dkim_domains', 'domains');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (84, 'dkim', 'dkim_dkimkeys', 'dkim-keys.conf');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (84, 'dkim', 'dkim_dkimkeys', 'dkim-keys.conf');
|
||||||
@@ -547,6 +547,8 @@ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) V
|
|||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (116, 'system','ssl_key_file','/etc/apache2/apache2.key');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (116, 'system','ssl_key_file','/etc/apache2/apache2.key');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (117, 'system','ssl_ca_file','');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (117, 'system','ssl_ca_file','');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (118, 'panel', 'frontend', 'froxlor');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (118, 'panel', 'frontend', 'froxlor');
|
||||||
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (119, 'spf', 'use_spf', '0');
|
||||||
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (120, 'spf', 'spf_entry', '@ IN TXT "v=spf1 a mx -all"');
|
||||||
|
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
|
|
||||||
@@ -99,14 +99,14 @@ function page_header()
|
|||||||
</head>
|
</head>
|
||||||
<body style="margin: 0; padding: 0;" onload="document.loginform.loginname.focus()">
|
<body style="margin: 0; padding: 0;" onload="document.loginform.loginname.focus()">
|
||||||
<!--
|
<!--
|
||||||
We request you retain the full copyright notice below including the link to www.syscp.org.
|
We request you retain the full copyright notice below including the link to www.froxlor.org.
|
||||||
This not only gives respect to the large amount of time given freely by the developers
|
This not only gives respect to the large amount of time given freely by the developers
|
||||||
but also helps build interest, traffic and use of SysCP. If you refuse
|
but also helps build interest, traffic and use of Froxlor. If you refuse
|
||||||
to include even this then support on our forums may be affected.
|
to include even this then support on our forums may be affected.
|
||||||
The SysCP Team : 2003-2009
|
The Froxlor Team : 2009-2010
|
||||||
// -->
|
// -->
|
||||||
<!--
|
<!--
|
||||||
Templates by Luca Piona (info@havanastudio.ch) and Luca Longinotti (chtekk@gentoo.org)
|
Templates based on work by Luca Piona (info@havanastudio.ch) and Luca Longinotti (chtekk@gentoo.org)
|
||||||
// -->
|
// -->
|
||||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
@@ -132,7 +132,7 @@ function page_footer()
|
|||||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td width="100%" class="footer">
|
<td width="100%" class="footer">
|
||||||
<br />SysCP © 2003-2009 by <a href="http://www.syscp.org/" target="_blank">the SysCP Team</a>
|
<br />Froxlor © 2009-2010 by <a href="http://www.froxlor.org/" target="_blank">the Froxlor Team</a>
|
||||||
<br /><br/>
|
<br /><br/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -370,6 +370,21 @@ if(isset($_POST['installstep'])
|
|||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$_die = false;
|
$_die = false;
|
||||||
|
|
||||||
|
// check for correct php version
|
||||||
|
status_message('begin', $lng['install']['phpversion']);
|
||||||
|
|
||||||
|
if(version_compare("5.2.0", PHP_VERSION, ">="))
|
||||||
|
{
|
||||||
|
status_message('red', $lng['install']['notinstalled']);
|
||||||
|
$_die = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
status_message('green', 'OK');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
status_message('begin', $lng['install']['phpmysql']);
|
status_message('begin', $lng['install']['phpmysql']);
|
||||||
|
|
||||||
if(!extension_loaded('mysql'))
|
if(!extension_loaded('mysql'))
|
||||||
@@ -394,6 +409,18 @@ if(isset($_POST['installstep'])
|
|||||||
status_message('green', 'OK');
|
status_message('green', 'OK');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
status_message('begin', $lng['install']['phpposix']);
|
||||||
|
|
||||||
|
if(!extension_loaded('posix'))
|
||||||
|
{
|
||||||
|
status_message('red', $lng['install']['notinstalled']);
|
||||||
|
$_die = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
status_message('green', 'OK');
|
||||||
|
}
|
||||||
|
|
||||||
status_message('begin', $lng['install']['phpbcmath']);
|
status_message('begin', $lng['install']['phpbcmath']);
|
||||||
|
|
||||||
if(!extension_loaded('bcmath'))
|
if(!extension_loaded('bcmath'))
|
||||||
@@ -422,7 +449,7 @@ if(isset($_POST['installstep'])
|
|||||||
|
|
||||||
if($_die)
|
if($_die)
|
||||||
{
|
{
|
||||||
status_message('begin', $lng['install']['diedbecauseofextensions']);
|
status_message('begin', $lng['install']['diedbecauseofrequirements']);
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -442,7 +469,7 @@ if(isset($_POST['installstep'])
|
|||||||
|
|
||||||
if($result)
|
if($result)
|
||||||
{
|
{
|
||||||
$filename = "/tmp/syscp_backup_" . date(YmdHi) . ".sql";
|
$filename = "/tmp/froxlor_backup_" . date(YmdHi) . ".sql";
|
||||||
|
|
||||||
if(is_file("/usr/bin/mysqldump"))
|
if(is_file("/usr/bin/mysqldump"))
|
||||||
{
|
{
|
||||||
@@ -475,7 +502,7 @@ if(isset($_POST['installstep'])
|
|||||||
$db_root->query("FLUSH PRIVILEGES;");
|
$db_root->query("FLUSH PRIVILEGES;");
|
||||||
status_message('green', 'OK');
|
status_message('green', 'OK');
|
||||||
|
|
||||||
//then we have to create a new user and database for the syscp unprivileged mysql access
|
//then we have to create a new user and database for the froxlor unprivileged mysql access
|
||||||
|
|
||||||
status_message('begin', $lng['install']['create_mysqluser_and_db']);
|
status_message('begin', $lng['install']['create_mysqluser_and_db']);
|
||||||
$db_root->query("CREATE DATABASE `" . $db_root->escape(str_replace('`', '', $mysql_database)) . "`");
|
$db_root->query("CREATE DATABASE `" . $db_root->escape(str_replace('`', '', $mysql_database)) . "`");
|
||||||
@@ -504,13 +531,13 @@ if(isset($_POST['installstep'])
|
|||||||
$mysql_access_host = implode(',', $mysql_access_host_array);
|
$mysql_access_host = implode(',', $mysql_access_host_array);
|
||||||
status_message('green', 'OK');
|
status_message('green', 'OK');
|
||||||
|
|
||||||
//now a new database and the new syscp-unprivileged-mysql-account have been created and we can fill it now with the data.
|
//now a new database and the new froxlor-unprivileged-mysql-account have been created and we can fill it now with the data.
|
||||||
|
|
||||||
status_message('begin', $lng['install']['testing_new_db']);
|
status_message('begin', $lng['install']['testing_new_db']);
|
||||||
$db = new db($mysql_host, $mysql_unpriv_user, $mysql_unpriv_pass, $mysql_database);
|
$db = new db($mysql_host, $mysql_unpriv_user, $mysql_unpriv_pass, $mysql_database);
|
||||||
status_message('green', 'OK');
|
status_message('green', 'OK');
|
||||||
status_message('begin', $lng['install']['importing_data']);
|
status_message('begin', $lng['install']['importing_data']);
|
||||||
$db_schema = './syscp.sql';
|
$db_schema = './froxlor.sql';
|
||||||
$sql_query = @file_get_contents($db_schema, 'r');
|
$sql_query = @file_get_contents($db_schema, 'r');
|
||||||
$sql_query = remove_remarks($sql_query);
|
$sql_query = remove_remarks($sql_query);
|
||||||
$sql_query = split_sql_file($sql_query, ';');
|
$sql_query = split_sql_file($sql_query, ';');
|
||||||
@@ -555,14 +582,14 @@ if(isset($_POST['installstep'])
|
|||||||
{
|
{
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/apache2/sites-enabled/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_vhost'");
|
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/apache2/sites-enabled/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_vhost'");
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/apache2/sites-enabled/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_diroptions'");
|
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/apache2/sites-enabled/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_diroptions'");
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/apache2/syscp-htpasswd/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_htpasswddir'");
|
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/apache2/froxlor-htpasswd/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_htpasswddir'");
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/init.d/apache2 reload' WHERE `settinggroup` = 'system' AND `varname` = 'apachereload_command'");
|
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/init.d/apache2 reload' WHERE `settinggroup` = 'system' AND `varname` = 'apachereload_command'");
|
||||||
}
|
}
|
||||||
elseif($webserver == "lighttpd")
|
elseif($webserver == "lighttpd")
|
||||||
{
|
{
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/conf-enabled/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_vhost'");
|
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/conf-enabled/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_vhost'");
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/syscp-diroptions/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_diroptions'");
|
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/froxlor-diroptions/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_diroptions'");
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/syscp-htpasswd/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_htpasswddir'");
|
$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/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'");
|
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/lighttpd.pem' WHERE `settinggroup` = 'system' AND `varname` = 'ssl_cert_file'");
|
||||||
}
|
}
|
||||||
@@ -632,7 +659,7 @@ if(isset($_POST['installstep'])
|
|||||||
|
|
||||||
status_message('begin', $lng['install']['creating_configfile']);
|
status_message('begin', $lng['install']['creating_configfile']);
|
||||||
$userdata = "<?php\n";
|
$userdata = "<?php\n";
|
||||||
$userdata.= "//automatically generated userdata.inc.php for SysCP\n";
|
$userdata.= "//automatically generated userdata.inc.php for Froxlor\n";
|
||||||
$userdata.= "\$sql['host']='" . addcslashes($mysql_host, "'\\") . "';\n";
|
$userdata.= "\$sql['host']='" . addcslashes($mysql_host, "'\\") . "';\n";
|
||||||
$userdata.= "\$sql['user']='" . addcslashes($mysql_unpriv_user, "'\\") . "';\n";
|
$userdata.= "\$sql['user']='" . addcslashes($mysql_unpriv_user, "'\\") . "';\n";
|
||||||
$userdata.= "\$sql['password']='" . addcslashes($mysql_unpriv_pass, "'\\") . "';\n";
|
$userdata.= "\$sql['password']='" . addcslashes($mysql_unpriv_pass, "'\\") . "';\n";
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ $lng['install']['syscp_succ_installed'] = 'SysCP was installed successfully.';
|
|||||||
$lng['install']['click_here_to_login'] = 'Click here to login.';
|
$lng['install']['click_here_to_login'] = 'Click here to login.';
|
||||||
$lng['install']['phpmysql'] = 'Testing if PHP MySQL-extension is installed...';
|
$lng['install']['phpmysql'] = 'Testing if PHP MySQL-extension is installed...';
|
||||||
$lng['install']['phpfilter'] = 'Testing if PHP filter-extension is installed...';
|
$lng['install']['phpfilter'] = 'Testing if PHP filter-extension is installed...';
|
||||||
$lng['install']['diedbecauseofextensions'] = 'Cannot install SysCP without these extensions! Aborting...';
|
$lng['install']['diedbecauseofrequirements'] = 'Cannot install SysCP without these requirements! Aborting...';
|
||||||
$lng['install']['notinstalled'] = 'not installed!';
|
$lng['install']['notinstalled'] = 'not installed!';
|
||||||
$lng['install']['phpbcmath'] = 'Testing if PHP bcmath-extension is installed...';
|
$lng['install']['phpbcmath'] = 'Testing if PHP bcmath-extension is installed...';
|
||||||
$lng['install']['bcmathdescription'] = 'Traffic-calculation related functions will not work correctly!';
|
$lng['install']['bcmathdescription'] = 'Traffic-calculation related functions will not work correctly!';
|
||||||
@@ -76,4 +76,10 @@ $lng['install']['openbasedirenabled'] = 'enabled. SysCP will not work properly w
|
|||||||
|
|
||||||
$lng['install']['webserver'] = 'Webserver';
|
$lng['install']['webserver'] = 'Webserver';
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Added in Froxlor 0.9
|
||||||
|
*/
|
||||||
|
$lng['install']['phpversion'] = 'Checking for PHP version >= 5.2';
|
||||||
|
$lng['install']['phpposix'] = 'Testing if PHP posix-extension is installed...';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ $lng['install']['syscp_succ_installed'] = 'SysCP wurde erfolgreich installiert.'
|
|||||||
$lng['install']['click_here_to_login'] = 'Hier geht es weiter zum Login-Fenster.';
|
$lng['install']['click_here_to_login'] = 'Hier geht es weiter zum Login-Fenster.';
|
||||||
$lng['install']['phpmysql'] = 'Teste, ob die PHP MySQL-Erweiterung installiert ist...';
|
$lng['install']['phpmysql'] = 'Teste, ob die PHP MySQL-Erweiterung installiert ist...';
|
||||||
$lng['install']['phpfilter'] = 'Teste, ob die PHP Filter-Erweiterung installiert ist...';
|
$lng['install']['phpfilter'] = 'Teste, ob die PHP Filter-Erweiterung installiert ist...';
|
||||||
$lng['install']['diedbecauseofextensions'] = 'Kann SysCP ohne diese Erweiterungen nicht installieren! Breche ab...';
|
$lng['install']['diedbecauseofrequirements'] = 'Kann SysCP ohne diese Voraussetzungen nicht installieren! Breche ab...';
|
||||||
$lng['install']['notinstalled'] = 'nicht installiert!';
|
$lng['install']['notinstalled'] = 'nicht installiert!';
|
||||||
$lng['install']['phpbcmath'] = 'Teste, ob die PHP bcmath-Erweiterung installiert ist...';
|
$lng['install']['phpbcmath'] = 'Teste, ob die PHP bcmath-Erweiterung installiert ist...';
|
||||||
$lng['install']['bcmathdescription'] = 'Traffic-Berechnungs bezogene Funktionen stehen nicht vollständig zur Verfügung!';
|
$lng['install']['bcmathdescription'] = 'Traffic-Berechnungs bezogene Funktionen stehen nicht vollständig zur Verfügung!';
|
||||||
@@ -73,4 +73,10 @@ $lng['install']['httpgroup'] = 'HTTP Gruppenname';
|
|||||||
|
|
||||||
$lng['install']['webserver'] = 'Webserver';
|
$lng['install']['webserver'] = 'Webserver';
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Added in Froxlor 0.9
|
||||||
|
*/
|
||||||
|
$lng['install']['phpversion'] = 'Prüfe PHP Version >= 5.2';
|
||||||
|
$lng['install']['phpposix'] = 'Teste, ob die PHP Posix-Erweiterung installiert ist...';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -194,6 +194,12 @@ if($settings['panel']['frontend'] == 'froxlor'
|
|||||||
$db->query("DELETE FROM `" . TABLE_PANEL_SETTINGS . "`
|
$db->query("DELETE FROM `" . TABLE_PANEL_SETTINGS . "`
|
||||||
WHERE `settinggroup` = 'billing';");
|
WHERE `settinggroup` = 'billing';");
|
||||||
|
|
||||||
|
$db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "`
|
||||||
|
MODIFY `traffic` BIGINT(30),
|
||||||
|
MODIFY `traffic_used` BIGINT(30)");
|
||||||
|
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (119, 'spf', 'use_spf', '0');");
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (120, 'spf', 'spf_entry', '@ IN TXT \"v=spf1 a mx -all\"');");
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -2924,7 +2924,7 @@ class ApsParser
|
|||||||
$Groupname = '';
|
$Groupname = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$Value = GetInstallationValue($PackageId, $CustomerId, strval($Setting['id']));
|
$Value = self::GetInstallationValue($PackageId, $CustomerId, strval($Setting['id']));
|
||||||
|
|
||||||
if($Value)
|
if($Value)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ class ticket
|
|||||||
private function readData()
|
private function readData()
|
||||||
{
|
{
|
||||||
if(isset($this->tid)
|
if(isset($this->tid)
|
||||||
&& $this->tid != - 1)
|
&& $this->tid != - 1)
|
||||||
{
|
{
|
||||||
$_ticket = $this->db->query_first('SELECT * FROM `' . TABLE_PANEL_TICKETS . '` WHERE `id` = "' . $this->tid . '"');
|
$_ticket = $this->db->query_first('SELECT * FROM `' . TABLE_PANEL_TICKETS . '` WHERE `id` = "' . $this->tid . '"');
|
||||||
$this->Set('customer', $_ticket['customerid'], true, false);
|
$this->Set('customer', $_ticket['customerid'], true, false);
|
||||||
@@ -161,7 +161,7 @@ class ticket
|
|||||||
|
|
||||||
public function Insert()
|
public function Insert()
|
||||||
{
|
{
|
||||||
$this->db->query("INSERT INTO `" . TABLE_PANEL_TICKETS . "`
|
$this->db->query("INSERT INTO `" . TABLE_PANEL_TICKETS . "`
|
||||||
(`customerid`,
|
(`customerid`,
|
||||||
`adminid`,
|
`adminid`,
|
||||||
`category`,
|
`category`,
|
||||||
@@ -201,7 +201,7 @@ class ticket
|
|||||||
{
|
{
|
||||||
// Update "main" ticket
|
// Update "main" ticket
|
||||||
|
|
||||||
$this->db->query('UPDATE `' . TABLE_PANEL_TICKETS . '` SET
|
$this->db->query('UPDATE `' . TABLE_PANEL_TICKETS . '` SET
|
||||||
`priority` = "' . (int)$this->Get('priority') . '",
|
`priority` = "' . (int)$this->Get('priority') . '",
|
||||||
`lastchange` = "' . (int)$this->Get('lastchange') . '",
|
`lastchange` = "' . (int)$this->Get('lastchange') . '",
|
||||||
`status` = "' . (int)$this->Get('status') . '",
|
`status` = "' . (int)$this->Get('status') . '",
|
||||||
@@ -256,7 +256,7 @@ class ticket
|
|||||||
{
|
{
|
||||||
// Get e-mail message for customer
|
// Get e-mail message for customer
|
||||||
|
|
||||||
$usr = $this->db->query_first('SELECT `name`, `firstname`, `email`
|
$usr = $this->db->query_first('SELECT `name`, `firstname`, `email`
|
||||||
FROM `' . TABLE_PANEL_CUSTOMERS . '`
|
FROM `' . TABLE_PANEL_CUSTOMERS . '`
|
||||||
WHERE `customerid` = "' . (int)$customerid . '"');
|
WHERE `customerid` = "' . (int)$customerid . '"');
|
||||||
$replace_arr = array(
|
$replace_arr = array(
|
||||||
@@ -272,13 +272,13 @@ class ticket
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '`
|
$result = $this->db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '`
|
||||||
WHERE `adminid`=\'' . (int)$this->userinfo['adminid'] . '\'
|
WHERE `adminid`=\'' . (int)$this->userinfo['adminid'] . '\'
|
||||||
AND `language`=\'' . $this->db->escape($this->userinfo['def_language']) . '\'
|
AND `language`=\'' . $this->db->escape($this->userinfo['def_language']) . '\'
|
||||||
AND `templategroup`=\'mails\'
|
AND `templategroup`=\'mails\'
|
||||||
AND `varname`=\'' . $template_subject . '\'');
|
AND `varname`=\'' . $template_subject . '\'');
|
||||||
$mail_subject = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $default_subject), $replace_arr));
|
$mail_subject = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $default_subject), $replace_arr));
|
||||||
$result = $this->db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '`
|
$result = $this->db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '`
|
||||||
WHERE `adminid`=\'' . (int)$this->userinfo['adminid'] . '\'
|
WHERE `adminid`=\'' . (int)$this->userinfo['adminid'] . '\'
|
||||||
AND `language`=\'' . $this->db->escape($this->userinfo['def_language']) . '\'
|
AND `language`=\'' . $this->db->escape($this->userinfo['def_language']) . '\'
|
||||||
AND `templategroup`=\'mails\'
|
AND `templategroup`=\'mails\'
|
||||||
@@ -325,7 +325,7 @@ class ticket
|
|||||||
static public function addCategory($_db, $_category = null, $_admin = 1)
|
static public function addCategory($_db, $_category = null, $_admin = 1)
|
||||||
{
|
{
|
||||||
if($_category != null
|
if($_category != null
|
||||||
&& $_category != '')
|
&& $_category != '')
|
||||||
{
|
{
|
||||||
$_db->query('INSERT INTO `' . TABLE_PANEL_TICKET_CATS . '` (`name`, `adminid`) VALUES ("' . $_db->escape($_category) . '", "' . (int)$_admin . '")');
|
$_db->query('INSERT INTO `' . TABLE_PANEL_TICKET_CATS . '` (`name`, `adminid`) VALUES ("' . $_db->escape($_category) . '", "' . (int)$_admin . '")');
|
||||||
return true;
|
return true;
|
||||||
@@ -341,10 +341,10 @@ class ticket
|
|||||||
static public function editCategory($_db, $_category = null, $_id = 0)
|
static public function editCategory($_db, $_category = null, $_id = 0)
|
||||||
{
|
{
|
||||||
if($_category != null
|
if($_category != null
|
||||||
&& $_category != ''
|
&& $_category != ''
|
||||||
&& $_id != 0)
|
&& $_id != 0)
|
||||||
{
|
{
|
||||||
$_db->query('UPDATE `' . TABLE_PANEL_TICKET_CATS . '` SET `name` = "' . $_db->escape($_category) . '"
|
$_db->query('UPDATE `' . TABLE_PANEL_TICKET_CATS . '` SET `name` = "' . $_db->escape($_category) . '"
|
||||||
WHERE `id` = "' . (int)$_id . '"');
|
WHERE `id` = "' . (int)$_id . '"');
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -360,7 +360,7 @@ class ticket
|
|||||||
{
|
{
|
||||||
if($_id != 0)
|
if($_id != 0)
|
||||||
{
|
{
|
||||||
$result = $_db->query_first('SELECT COUNT(`id`) as `numtickets` FROM `' . TABLE_PANEL_TICKETS . '`
|
$result = $_db->query_first('SELECT COUNT(`id`) as `numtickets` FROM `' . TABLE_PANEL_TICKETS . '`
|
||||||
WHERE `category` = "' . (int)$_id . '"');
|
WHERE `category` = "' . (int)$_id . '"');
|
||||||
|
|
||||||
if($result['numtickets'] == "0")
|
if($result['numtickets'] == "0")
|
||||||
@@ -402,7 +402,7 @@ class ticket
|
|||||||
{
|
{
|
||||||
$archived = array();
|
$archived = array();
|
||||||
$counter = 0;
|
$counter = 0;
|
||||||
$result = $_db->query('SELECT *,
|
$result = $_db->query('SELECT *,
|
||||||
(SELECT COUNT(`sub`.`id`)
|
(SELECT COUNT(`sub`.`id`)
|
||||||
FROM `' . TABLE_PANEL_TICKETS . '` `sub`
|
FROM `' . TABLE_PANEL_TICKETS . '` `sub`
|
||||||
WHERE `sub`.`answerto` = `main`.`id`) as `ticket_answers`
|
WHERE `sub`.`answerto` = `main`.`id`) as `ticket_answers`
|
||||||
@@ -446,42 +446,42 @@ class ticket
|
|||||||
|
|
||||||
static public function getArchiveSearchStatement($subject = NULL, $priority = NULL, $fromdate = NULL, $todate = NULL, $message = NULL, $customer = - 1, $admin = 1, $categories = NULL)
|
static public function getArchiveSearchStatement($subject = NULL, $priority = NULL, $fromdate = NULL, $todate = NULL, $message = NULL, $customer = - 1, $admin = 1, $categories = NULL)
|
||||||
{
|
{
|
||||||
$query = 'SELECT `main`.*,
|
$query = 'SELECT `main`.*,
|
||||||
(SELECT COUNT(`sub`.`id`) FROM `' . TABLE_PANEL_TICKETS . '` `sub`
|
(SELECT COUNT(`sub`.`id`) FROM `' . TABLE_PANEL_TICKETS . '` `sub`
|
||||||
WHERE `sub`.`answerto` = `main`.`id`) as `ticket_answers`
|
WHERE `sub`.`answerto` = `main`.`id`) as `ticket_answers`
|
||||||
FROM `' . TABLE_PANEL_TICKETS . '` `main`
|
FROM `' . TABLE_PANEL_TICKETS . '` `main`
|
||||||
WHERE `main`.`archived` = "1" AND `main`.`answerto` = "0" AND `main`.`adminid` = "' . (int)$admin . '"';
|
WHERE `main`.`archived` = "1" AND `main`.`answerto` = "0" AND `main`.`adminid` = "' . (int)$admin . '"';
|
||||||
|
|
||||||
if($subject != NULL
|
if($subject != NULL
|
||||||
&& $subject != '')
|
&& $subject != '')
|
||||||
{
|
{
|
||||||
$query.= 'AND `main`.`subject` LIKE "%' . $subject . '%" ';
|
$query.= 'AND `main`.`subject` LIKE "%' . $subject . '%" ';
|
||||||
}
|
}
|
||||||
|
|
||||||
if($priority != NULL
|
if($priority != NULL
|
||||||
&& isset($priority[0])
|
&& isset($priority[0])
|
||||||
&& $priority[0] != '')
|
&& $priority[0] != '')
|
||||||
{
|
{
|
||||||
if(isset($priority[1])
|
if(isset($priority[1])
|
||||||
&& $priority[1] != '')
|
&& $priority[1] != '')
|
||||||
{
|
{
|
||||||
if(isset($priority[2])
|
if(isset($priority[2])
|
||||||
&& $priority[2] != '')
|
&& $priority[2] != '')
|
||||||
{
|
{
|
||||||
$query.= 'AND (`main`.`priority` = "1"
|
$query.= 'AND (`main`.`priority` = "1"
|
||||||
OR `main`.`priority` = "2"
|
OR `main`.`priority` = "2"
|
||||||
OR `main`.`priority` = "3") ';
|
OR `main`.`priority` = "3") ';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$query.= 'AND (`main`.`priority` = "1"
|
$query.= 'AND (`main`.`priority` = "1"
|
||||||
OR `main`.`priority` = "2") ';
|
OR `main`.`priority` = "2") ';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif(isset($priority[2])
|
elseif(isset($priority[2])
|
||||||
&& $priority[2] != '')
|
&& $priority[2] != '')
|
||||||
{
|
{
|
||||||
$query.= 'AND (`main`.`priority` = "1"
|
$query.= 'AND (`main`.`priority` = "1"
|
||||||
OR `main`.`priority` = "3") ';
|
OR `main`.`priority` = "3") ';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -490,13 +490,13 @@ class ticket
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif($priority != NULL
|
elseif($priority != NULL
|
||||||
&& isset($priority[1])
|
&& isset($priority[1])
|
||||||
&& $priority[1] != '')
|
&& $priority[1] != '')
|
||||||
{
|
{
|
||||||
if(isset($priority[2])
|
if(isset($priority[2])
|
||||||
&& $priority[2] != '')
|
&& $priority[2] != '')
|
||||||
{
|
{
|
||||||
$query.= 'AND (`main`.`priority` = "2"
|
$query.= 'AND (`main`.`priority` = "2"
|
||||||
OR `main`.`priority` = "3") ';
|
OR `main`.`priority` = "3") ';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -507,26 +507,26 @@ class ticket
|
|||||||
elseif($priority != NULL)
|
elseif($priority != NULL)
|
||||||
{
|
{
|
||||||
if(isset($priority[3])
|
if(isset($priority[3])
|
||||||
&& $priority[3] != '')
|
&& $priority[3] != '')
|
||||||
{
|
{
|
||||||
$query.= 'AND `main`.`priority` = "3" ';
|
$query.= 'AND `main`.`priority` = "3" ';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($fromdate != NULL
|
if($fromdate != NULL
|
||||||
&& $fromdate > 0)
|
&& $fromdate > 0)
|
||||||
{
|
{
|
||||||
$query.= 'AND `main`.`lastchange` > "' . $fromdate . '" ';
|
$query.= 'AND `main`.`lastchange` > "' . $fromdate . '" ';
|
||||||
}
|
}
|
||||||
|
|
||||||
if($todate != NULL
|
if($todate != NULL
|
||||||
&& $todate > 0)
|
&& $todate > 0)
|
||||||
{
|
{
|
||||||
$query.= 'AND `main`.`lastchange` < "' . $todate . '" ';
|
$query.= 'AND `main`.`lastchange` < "' . $todate . '" ';
|
||||||
}
|
}
|
||||||
|
|
||||||
if($message != NULL
|
if($message != NULL
|
||||||
&& $message != '')
|
&& $message != '')
|
||||||
{
|
{
|
||||||
$query.= 'AND `main`.`message` LIKE "%' . $message . '%" ';
|
$query.= 'AND `main`.`message` LIKE "%' . $message . '%" ';
|
||||||
}
|
}
|
||||||
@@ -546,7 +546,7 @@ class ticket
|
|||||||
foreach($categories as $catid)
|
foreach($categories as $catid)
|
||||||
{
|
{
|
||||||
if(isset($catid)
|
if(isset($catid)
|
||||||
&& $catid > 0)
|
&& $catid > 0)
|
||||||
{
|
{
|
||||||
$query.= '`main`.`category` = "' . $catid . '" OR ';
|
$query.= '`main`.`category` = "' . $catid . '" OR ';
|
||||||
}
|
}
|
||||||
@@ -605,6 +605,27 @@ class ticket
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function convertLatin1ToHtml($str)
|
||||||
|
{
|
||||||
|
$html_entities = array (
|
||||||
|
"<EFBFBD>" => "Ä",
|
||||||
|
"<EFBFBD>" => "ä",
|
||||||
|
"<EFBFBD>" => "Ö",
|
||||||
|
"<EFBFBD>" => "ö",
|
||||||
|
"<EFBFBD>" => "Ü",
|
||||||
|
"<EFBFBD>" => "ü",
|
||||||
|
"<EFBFBD>" => "ß"
|
||||||
|
/*
|
||||||
|
* @TODO continue this table for all the special-characters
|
||||||
|
*/
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach ($html_entities as $key => $value) {
|
||||||
|
$str = str_replace($key, $value, $str);
|
||||||
|
}
|
||||||
|
return $str;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a data-var
|
* Get a data-var
|
||||||
*/
|
*/
|
||||||
@@ -643,7 +664,7 @@ class ticket
|
|||||||
public function Set($_var = '', $_value = '', $_vartrusted = false, $_valuetrusted = false)
|
public function Set($_var = '', $_value = '', $_vartrusted = false, $_valuetrusted = false)
|
||||||
{
|
{
|
||||||
if($_var != ''
|
if($_var != ''
|
||||||
&& $_value != '')
|
&& $_value != '')
|
||||||
{
|
{
|
||||||
if(!$_vartrusted)
|
if(!$_vartrusted)
|
||||||
{
|
{
|
||||||
@@ -655,6 +676,11 @@ class ticket
|
|||||||
$_value = htmlspecialchars($_value);
|
$_value = htmlspecialchars($_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(strtolower($_var) == 'message' || strtolower($_var) == 'subject')
|
||||||
|
{
|
||||||
|
$_value = $this->convertLatin1ToHtml($_value);
|
||||||
|
}
|
||||||
|
|
||||||
$this->t_data[$_var] = $_value;
|
$this->t_data[$_var] = $_value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ return Array(
|
|||||||
'label' => 'PowerDNS',
|
'label' => 'PowerDNS',
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'etc_powerdns_pdns.conf' => '/etc/powerdns/pdns.conf',
|
'etc_powerdns_pdns.conf' => '/etc/powerdns/pdns.conf',
|
||||||
'etc_powerdns_pdns-syscp.conf' => '/etc/powerdns/pdns_syscp.conf',
|
'etc_powerdns_pdns-froxlor.conf' => '/etc/powerdns/pdns_froxlor.conf',
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/pdns restart'
|
'/etc/init.d/pdns restart'
|
||||||
@@ -121,14 +121,14 @@ return Array(
|
|||||||
),
|
),
|
||||||
'files' => Array(
|
'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_acl_30_exim4-config_check_rcpt.rul' => '/etc/exim4/conf.d/acl/30_exim4-config_check_rcpt.rul',
|
||||||
'etc_exim4_conf.d_auth_30_syscp-config' => '/etc/exim4/conf.d/auth/30_syscp-config',
|
'etc_exim4_conf.d_auth_30_froxlor-config' => '/etc/exim4/conf.d/auth/30_froxlor-config',
|
||||||
'etc_exim4_conf.d_main_10_syscp-config_options' => '/etc/exim4/conf.d/main/10_syscp-config_options',
|
'etc_exim4_conf.d_main_10_froxlor-config_options' => '/etc/exim4/conf.d/main/10_froxlor-config_options',
|
||||||
'etc_exim4_conf.d_router_180_syscp-config' => '/etc/exim4/conf.d/router/180_syscp-config',
|
'etc_exim4_conf.d_router_180_froxlor-config' => '/etc/exim4/conf.d/router/180_froxlor-config',
|
||||||
'etc_exim4_conf.d_transport_30_syscp-config' => '/etc/exim4/conf.d/transport/30_syscp-config'
|
'etc_exim4_conf.d_transport_30_froxlor-config' => '/etc/exim4/conf.d/transport/30_froxlor-config'
|
||||||
),
|
),
|
||||||
'commands_2' => Array(
|
'commands_2' => Array(
|
||||||
'chmod o-rx /var/lib/exim4',
|
'chmod o-rx /var/lib/exim4',
|
||||||
'chmod o-rx /etc/exim4/conf.d/main/10_syscp-config_options'
|
'chmod o-rx /etc/exim4/conf.d/main/10_froxlor-config_options'
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/exim4 restart'
|
'/etc/init.d/exim4 restart'
|
||||||
@@ -210,20 +210,19 @@ return Array(
|
|||||||
'cron' => Array(
|
'cron' => Array(
|
||||||
'label' => 'Crond (cronscript)',
|
'label' => 'Crond (cronscript)',
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'etc_cron.d_syscp' => '/etc/cron.d/syscp'
|
'etc_cron.d_froxlor' => '/etc/cron.d/froxlor'
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/cron restart'
|
'/etc/init.d/cron restart'
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'xinetd' => Array(
|
'xinetd' => Array(
|
||||||
'label' => 'xinet.d (syscp updates in realtime)',
|
'label' => 'xinet.d (froxlor updates in realtime)',
|
||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
'apt-get install xinetd',
|
'apt-get install xinetd'
|
||||||
'echo -e "syscp ' . $settings['system']['realtime_port'] . '/tcp # SysCP Realtime" >> /etc/services'
|
|
||||||
),
|
),
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'etc_xinet.d_syscp' => '/etc/xinetd.d/syscp'
|
'etc_xinet.d_froxlor' => '/etc/xinetd.d/froxlor'
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/xinetd restart'
|
'/etc/init.d/xinetd restart'
|
||||||
@@ -232,12 +231,12 @@ return Array(
|
|||||||
'awstats' => Array(
|
'awstats' => Array(
|
||||||
'label' => 'Awstats',
|
'label' => 'Awstats',
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
($settings['system']['mod_log_sql'] == 1 ? 'etc_awstats_awstats.model_log_sql.conf.syscp' : 'etc_awstats_awstats.model.conf.syscp') => '/etc/awstats/awstats.model.conf.syscp',
|
($settings['system']['mod_log_sql'] == 1 ? 'etc_awstats_awstats.model_log_sql.conf.froxlor' : 'etc_awstats_awstats.model.conf.froxlor') => '/etc/awstats/awstats.model.conf.froxlor',
|
||||||
($settings['system']['mod_log_sql'] == 1 ? 'etc_cron.d_awstats_log_sql' : 'etc_cron.d_awstats') => '/etc/cron.d/awstats',
|
($settings['system']['mod_log_sql'] == 1 ? 'etc_cron.d_awstats_log_sql' : 'etc_cron.d_awstats') => '/etc/cron.d/awstats',
|
||||||
($settings['system']['webserver'] == 'lighttpd' ? 'etc_lighttpd_syscp-awstats.conf' : 'etc_apache_vhosts_05_awstats.conf') => ($settings['system']['webserver'] == 'lighttpd' ? '/etc/lighttpd/syscp-awstats.conf' : '/etc/apache2/sites-enabled/05_awstats.conf')
|
($settings['system']['webserver'] == 'lighttpd' ? 'etc_lighttpd_froxlor-awstats.conf' : 'etc_apache_vhosts_05_awstats.conf') => ($settings['system']['webserver'] == 'lighttpd' ? '/etc/lighttpd/froxlor-awstats.conf' : '/etc/apache2/sites-enabled/05_awstats.conf')
|
||||||
),
|
),
|
||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"syscp-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '')
|
($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"froxlor-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '')
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart')
|
($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart')
|
||||||
|
|||||||
@@ -220,18 +220,12 @@ milter_default_action = accept\n" >> /etc/postfix/main.cf'
|
|||||||
'cron' => Array(
|
'cron' => Array(
|
||||||
'label' => 'Crond (cronscript)',
|
'label' => 'Crond (cronscript)',
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'etc_php_syscp-cronjob_php.ini' => '/etc/php/syscp-cronjob/php.ini',
|
'etc_cron.d_froxlor' => '/etc/cron.d/froxlor'
|
||||||
'etc_cron.d_syscp' => '/etc/cron.d/syscp'
|
|
||||||
),
|
),
|
||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
'touch /etc/cron.d/syscp',
|
'touch /etc/cron.d/froxlor',
|
||||||
'chown root:0 /etc/cron.d/syscp',
|
'chown root:0 /etc/cron.d/froxlor',
|
||||||
'chmod 0640 /etc/cron.d/syscp',
|
'chmod 0640 /etc/cron.d/froxlor',
|
||||||
'mkdir -p /etc/php/syscp-cronjob',
|
|
||||||
'touch /etc/php/syscp-cronjob/php.ini',
|
|
||||||
'chown -R root:0 /etc/php/syscp-cronjob',
|
|
||||||
'chmod 0750 /etc/php/syscp-cronjob',
|
|
||||||
'chmod 0640 /etc/php/syscp-cronjob/php.ini'
|
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'rc-update add vixie-cron default',
|
'rc-update add vixie-cron default',
|
||||||
@@ -239,13 +233,12 @@ milter_default_action = accept\n" >> /etc/postfix/main.cf'
|
|||||||
)
|
)
|
||||||
),
|
),
|
||||||
'xinetd' => Array(
|
'xinetd' => Array(
|
||||||
'label' => 'xinet.d (syscp updates in realtime)',
|
'label' => 'xinet.d (froxlor updates in realtime)',
|
||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
'emerge -av xinetd',
|
'emerge -av xinetd'
|
||||||
'echo -e "syscp ' . $settings['system']['realtime_port'] . '/tcp # SysCP Realtime" >> /etc/services'
|
|
||||||
),
|
),
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'etc_xinet.d_syscp' => '/etc/xinetd.d/syscp'
|
'etc_xinet.d_froxlor' => '/etc/xinetd.d/froxlor'
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/xinetd restart'
|
'/etc/init.d/xinetd restart'
|
||||||
@@ -254,12 +247,12 @@ milter_default_action = accept\n" >> /etc/postfix/main.cf'
|
|||||||
'awstats' => Array(
|
'awstats' => Array(
|
||||||
'label' => 'Awstats',
|
'label' => 'Awstats',
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
($settings['system']['mod_log_sql'] == 1 ? 'etc_awstats_awstats.model_log_sql.conf.syscp' : 'etc_awstats_awstats.model.conf.syscp') => '/etc/awstats/awstats.model.conf.syscp',
|
($settings['system']['mod_log_sql'] == 1 ? 'etc_awstats_awstats.model_log_sql.conf.froxlor' : 'etc_awstats_awstats.model.conf.froxlor') => '/etc/awstats/awstats.model.conf.froxlor',
|
||||||
($settings['system']['mod_log_sql'] == 1 ? 'etc_cron.d_awstats_log_sql' : 'etc_cron.d_awstats') => '/etc/cron.d/awstats',
|
($settings['system']['mod_log_sql'] == 1 ? 'etc_cron.d_awstats_log_sql' : 'etc_cron.d_awstats') => '/etc/cron.d/awstats',
|
||||||
($settings['system']['webserver'] == 'lighttpd' ? 'etc_lighttpd_syscp-awstats.conf' : 'etc_apache_vhosts_05_awstats.conf') => ($settings['system']['webserver'] == 'lighttpd' ? '/etc/lighttpd/syscp-awstats.conf' : '/etc/apache2/sites-enabled/05_awstats.conf')
|
($settings['system']['webserver'] == 'lighttpd' ? 'etc_lighttpd_froxlor-awstats.conf' : 'etc_apache_vhosts_05_awstats.conf') => ($settings['system']['webserver'] == 'lighttpd' ? '/etc/lighttpd/froxlor-awstats.conf' : '/etc/apache2/sites-enabled/05_awstats.conf')
|
||||||
),
|
),
|
||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"syscp-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '')
|
($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"froxlor-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '')
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart')
|
($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart')
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ return Array(
|
|||||||
'label' => 'PowerDNS',
|
'label' => 'PowerDNS',
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'etc_powerdns_pdns.conf' => '/etc/powerdns/pdns.conf',
|
'etc_powerdns_pdns.conf' => '/etc/powerdns/pdns.conf',
|
||||||
'etc_powerdns_pdns-syscp.conf' => '/etc/powerdns/pdns_syscp.conf',
|
'etc_powerdns_pdns-froxlor.conf' => '/etc/powerdns/pdns_froxlor.conf',
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/pdns restart'
|
'/etc/init.d/pdns restart'
|
||||||
@@ -121,14 +121,14 @@ return Array(
|
|||||||
),
|
),
|
||||||
'files' => Array(
|
'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_acl_30_exim4-config_check_rcpt.rul' => '/etc/exim4/conf.d/acl/30_exim4-config_check_rcpt.rul',
|
||||||
'etc_exim4_conf.d_auth_30_syscp-config' => '/etc/exim4/conf.d/auth/30_syscp-config',
|
'etc_exim4_conf.d_auth_30_froxlor-config' => '/etc/exim4/conf.d/auth/30_froxlor-config',
|
||||||
'etc_exim4_conf.d_main_10_syscp-config_options' => '/etc/exim4/conf.d/main/10_syscp-config_options',
|
'etc_exim4_conf.d_main_10_froxlor-config_options' => '/etc/exim4/conf.d/main/10_froxlor-config_options',
|
||||||
'etc_exim4_conf.d_router_180_syscp-config' => '/etc/exim4/conf.d/router/180_syscp-config',
|
'etc_exim4_conf.d_router_180_froxlor-config' => '/etc/exim4/conf.d/router/180_froxlor-config',
|
||||||
'etc_exim4_conf.d_transport_30_syscp-config' => '/etc/exim4/conf.d/transport/30_syscp-config'
|
'etc_exim4_conf.d_transport_30_froxlor-config' => '/etc/exim4/conf.d/transport/30_froxlor-config'
|
||||||
),
|
),
|
||||||
'commands_2' => Array(
|
'commands_2' => Array(
|
||||||
'chmod o-rx /var/lib/exim4',
|
'chmod o-rx /var/lib/exim4',
|
||||||
'chmod o-rx /etc/exim4/conf.d/main/10_syscp-config_options'
|
'chmod o-rx /etc/exim4/conf.d/main/10_froxlor-config_options'
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/exim4 restart'
|
'/etc/init.d/exim4 restart'
|
||||||
@@ -204,20 +204,19 @@ return Array(
|
|||||||
'cron' => Array(
|
'cron' => Array(
|
||||||
'label' => 'Crond (cronscript)',
|
'label' => 'Crond (cronscript)',
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'etc_cron.d_syscp' => '/etc/cron.d/syscp'
|
'etc_cron.d_froxlor' => '/etc/cron.d/froxlor'
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/cron restart'
|
'/etc/init.d/cron restart'
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'xinetd' => Array(
|
'xinetd' => Array(
|
||||||
'label' => 'xinet.d (syscp updates in realtime)',
|
'label' => 'xinet.d (froxlor updates in realtime)',
|
||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
'apt-get install xinetd',
|
'apt-get install xinetd'
|
||||||
'echo -e "syscp ' . $settings['system']['realtime_port'] . '/tcp # SysCP Realtime" >> /etc/services'
|
|
||||||
),
|
),
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'etc_xinet.d_syscp' => '/etc/xinetd.d/syscp'
|
'etc_xinet.d_froxlor' => '/etc/xinetd.d/froxlor'
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/xinetd restart'
|
'/etc/init.d/xinetd restart'
|
||||||
@@ -226,12 +225,12 @@ return Array(
|
|||||||
'awstats' => Array(
|
'awstats' => Array(
|
||||||
'label' => 'Awstats',
|
'label' => 'Awstats',
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
($settings['system']['mod_log_sql'] == 1 ? 'etc_awstats_awstats.model_log_sql.conf.syscp' : 'etc_awstats_awstats.model.conf.syscp') => '/etc/awstats/awstats.model.conf.syscp',
|
($settings['system']['mod_log_sql'] == 1 ? 'etc_awstats_awstats.model_log_sql.conf.froxlor' : 'etc_awstats_awstats.model.conf.froxlor') => '/etc/awstats/awstats.model.conf.froxlor',
|
||||||
($settings['system']['mod_log_sql'] == 1 ? 'etc_cron.d_awstats_log_sql' : 'etc_cron.d_awstats') => '/etc/cron.d/awstats',
|
($settings['system']['mod_log_sql'] == 1 ? 'etc_cron.d_awstats_log_sql' : 'etc_cron.d_awstats') => '/etc/cron.d/awstats',
|
||||||
($settings['system']['webserver'] == 'lighttpd' ? 'etc_lighttpd_syscp-awstats.conf' : 'etc_apache_vhosts_05_awstats.conf') => ($settings['system']['webserver'] == 'lighttpd' ? '/etc/lighttpd/syscp-awstats.conf' : '/etc/apache2/sites-enabled/05_awstats.conf')
|
($settings['system']['webserver'] == 'lighttpd' ? 'etc_lighttpd_froxlor-awstats.conf' : 'etc_apache_vhosts_05_awstats.conf') => ($settings['system']['webserver'] == 'lighttpd' ? '/etc/lighttpd/froxlor-awstats.conf' : '/etc/apache2/sites-enabled/05_awstats.conf')
|
||||||
),
|
),
|
||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"syscp-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '')
|
($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"froxlor-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '')
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart')
|
($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart')
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ return Array(
|
|||||||
'label' => 'PowerDNS',
|
'label' => 'PowerDNS',
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'etc_powerdns_pdns.conf' => '/etc/powerdns/pdns.conf',
|
'etc_powerdns_pdns.conf' => '/etc/powerdns/pdns.conf',
|
||||||
'etc_powerdns_pdns-syscp.conf' => '/etc/powerdns/pdns_syscp.conf',
|
'etc_powerdns_pdns-froxlor.conf' => '/etc/powerdns/pdns_froxlor.conf',
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/pdns restart'
|
'/etc/init.d/pdns restart'
|
||||||
@@ -121,14 +121,14 @@ return Array(
|
|||||||
),
|
),
|
||||||
'files' => Array(
|
'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_acl_30_exim4-config_check_rcpt.rul' => '/etc/exim4/conf.d/acl/30_exim4-config_check_rcpt.rul',
|
||||||
'etc_exim4_conf.d_auth_30_syscp-config' => '/etc/exim4/conf.d/auth/30_syscp-config',
|
'etc_exim4_conf.d_auth_30_froxlor-config' => '/etc/exim4/conf.d/auth/30_froxlor-config',
|
||||||
'etc_exim4_conf.d_main_10_syscp-config_options' => '/etc/exim4/conf.d/main/10_syscp-config_options',
|
'etc_exim4_conf.d_main_10_froxlor-config_options' => '/etc/exim4/conf.d/main/10_froxlor-config_options',
|
||||||
'etc_exim4_conf.d_router_180_syscp-config' => '/etc/exim4/conf.d/router/180_syscp-config',
|
'etc_exim4_conf.d_router_180_froxlor-config' => '/etc/exim4/conf.d/router/180_froxlor-config',
|
||||||
'etc_exim4_conf.d_transport_30_syscp-config' => '/etc/exim4/conf.d/transport/30_syscp-config'
|
'etc_exim4_conf.d_transport_30_froxlor-config' => '/etc/exim4/conf.d/transport/30_froxlor-config'
|
||||||
),
|
),
|
||||||
'commands_2' => Array(
|
'commands_2' => Array(
|
||||||
'chmod o-rx /var/lib/exim4',
|
'chmod o-rx /var/lib/exim4',
|
||||||
'chmod o-rx /etc/exim4/conf.d/main/10_syscp-config_options'
|
'chmod o-rx /etc/exim4/conf.d/main/10_froxlor-config_options'
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/exim4 restart'
|
'/etc/init.d/exim4 restart'
|
||||||
@@ -211,20 +211,19 @@ return Array(
|
|||||||
'cron' => Array(
|
'cron' => Array(
|
||||||
'label' => 'Crond (cronscript)',
|
'label' => 'Crond (cronscript)',
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'etc_cron.d_syscp' => '/etc/cron.d/syscp'
|
'etc_cron.d_froxlor' => '/etc/cron.d/froxlor'
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/cron restart'
|
'/etc/init.d/cron restart'
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'xinetd' => Array(
|
'xinetd' => Array(
|
||||||
'label' => 'xinet.d (syscp updates in realtime)',
|
'label' => 'xinet.d (froxlor updates in realtime)',
|
||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
'apt-get install xinetd',
|
'apt-get install xinetd'
|
||||||
'echo -e "syscp ' . $settings['system']['realtime_port'] . '/tcp # SysCP Realtime" >> /etc/services'
|
|
||||||
),
|
),
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'etc_xinet.d_syscp' => '/etc/xinetd.d/syscp'
|
'etc_xinet.d_froxlor' => '/etc/xinetd.d/froxlor'
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/xinetd restart'
|
'/etc/init.d/xinetd restart'
|
||||||
@@ -233,12 +232,12 @@ return Array(
|
|||||||
'awstats' => Array(
|
'awstats' => Array(
|
||||||
'label' => 'Awstats',
|
'label' => 'Awstats',
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
($settings['system']['mod_log_sql'] == 1 ? 'etc_awstats_awstats.model_log_sql.conf.syscp' : 'etc_awstats_awstats.model.conf.syscp') => '/etc/awstats/awstats.model.conf.syscp',
|
($settings['system']['mod_log_sql'] == 1 ? 'etc_awstats_awstats.model_log_sql.conf.froxlor' : 'etc_awstats_awstats.model.conf.froxlor') => '/etc/awstats/awstats.model.conf.froxlor',
|
||||||
($settings['system']['mod_log_sql'] == 1 ? 'etc_cron.d_awstats_log_sql' : 'etc_cron.d_awstats') => '/etc/cron.d/awstats',
|
($settings['system']['mod_log_sql'] == 1 ? 'etc_cron.d_awstats_log_sql' : 'etc_cron.d_awstats') => '/etc/cron.d/awstats',
|
||||||
($settings['system']['webserver'] == 'lighttpd' ? 'etc_lighttpd_syscp-awstats.conf' : 'etc_apache_vhosts_05_awstats.conf') => ($settings['system']['webserver'] == 'lighttpd' ? '/etc/lighttpd/syscp-awstats.conf' : '/etc/apache2/sites-enabled/05_awstats.conf')
|
($settings['system']['webserver'] == 'lighttpd' ? 'etc_lighttpd_froxlor-awstats.conf' : 'etc_apache_vhosts_05_awstats.conf') => ($settings['system']['webserver'] == 'lighttpd' ? '/etc/lighttpd/froxlor-awstats.conf' : '/etc/apache2/sites-enabled/05_awstats.conf')
|
||||||
),
|
),
|
||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"syscp-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '')
|
($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"froxlor-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '')
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart')
|
($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart')
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ return Array(
|
|||||||
'cron' => Array(
|
'cron' => Array(
|
||||||
'label' => 'Crond (cronscript)',
|
'label' => 'Crond (cronscript)',
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
'etc_cron.d_syscp' => '/etc/cron.d/syscp'
|
'etc_cron.d_froxlor' => '/etc/cron.d/froxlor'
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
'/etc/init.d/cron restart'
|
'/etc/init.d/cron restart'
|
||||||
@@ -119,12 +119,12 @@ return Array(
|
|||||||
'awstats' => Array(
|
'awstats' => Array(
|
||||||
'label' => 'Awstats',
|
'label' => 'Awstats',
|
||||||
'files' => Array(
|
'files' => Array(
|
||||||
($settings['system']['mod_log_sql'] == 1 ? 'etc_awstats_awstats.model_log_sql.conf.syscp' : 'etc_awstats_awstats.model.conf.syscp') => '/etc/awstats/awstats.model.conf.syscp',
|
($settings['system']['mod_log_sql'] == 1 ? 'etc_awstats_awstats.model_log_sql.conf.froxlor' : 'etc_awstats_awstats.model.conf.froxlor') => '/etc/awstats/awstats.model.conf.froxlor',
|
||||||
($settings['system']['mod_log_sql'] == 1 ? 'etc_cron.d_awstats_log_sql' : 'etc_cron.d_awstats') => '/etc/cron.d/awstats',
|
($settings['system']['mod_log_sql'] == 1 ? 'etc_cron.d_awstats_log_sql' : 'etc_cron.d_awstats') => '/etc/cron.d/awstats',
|
||||||
($settings['system']['webserver'] == 'lighttpd' ? 'etc_lighttpd_syscp-awstats.conf' : 'etc_apache_vhosts_05_awstats.conf') => ($settings['system']['webserver'] == 'lighttpd' ? '/etc/lighttpd/syscp-awstats.conf' : '/etc/apache2/sites-enabled/05_awstats.conf')
|
($settings['system']['webserver'] == 'lighttpd' ? 'etc_lighttpd_froxlor-awstats.conf' : 'etc_apache_vhosts_05_awstats.conf') => ($settings['system']['webserver'] == 'lighttpd' ? '/etc/lighttpd/froxlor-awstats.conf' : '/etc/apache2/sites-enabled/05_awstats.conf')
|
||||||
),
|
),
|
||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"syscp-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '')
|
($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"froxlor-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '')
|
||||||
),
|
),
|
||||||
'restart' => Array(
|
'restart' => Array(
|
||||||
($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart')
|
($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart')
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of the SysCP project.
|
* This file is part of the Froxlor project.
|
||||||
* Copyright (c) 2003-2009 the SysCP Team (see authors).
|
* Copyright (c) 2009-2010 the Froxlor Team (see authors).
|
||||||
*
|
*
|
||||||
* For the full copyright and license information, please view the COPYING
|
* For the full copyright and license information, please view the COPYING
|
||||||
* file that was distributed with this source code. You can also view the
|
* file that was distributed with this source code. You can also view the
|
||||||
* COPYING file online at http://files.syscp.org/misc/COPYING.txt
|
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||||
*
|
*
|
||||||
* @copyright (c) the authors
|
* @copyright (c) the authors
|
||||||
* @author Florian Lippert <flo@syscp.org>
|
* @author Michael Kaufmann <d00p@froxlor.org>
|
||||||
* @author Florian Aders <eleras@syscp.org>
|
* @author Florian Aders <eleras@froxlor.org>
|
||||||
* @license GPLv2 http://files.syscp.org/misc/COPYING.txt
|
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||||
* @package System
|
* @package System
|
||||||
* @version $Id: cron_init.php 2724 2009-06-07 14:18:02Z flo $
|
* @version $Id: $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if(@php_sapi_name() != 'cli'
|
if(@php_sapi_name() != 'cli'
|
||||||
@@ -25,25 +25,25 @@ if(@php_sapi_name() != 'cli'
|
|||||||
|
|
||||||
$cronscriptDebug = false;
|
$cronscriptDebug = false;
|
||||||
$lockdir = '/var/run/';
|
$lockdir = '/var/run/';
|
||||||
$lockFilename = 'syscp_' . basename($_SERVER['PHP_SELF'], '.php') . '.lock-';
|
$lockFilename = 'froxlor_' . basename($_SERVER['PHP_SELF'], '.php') . '.lock-';
|
||||||
$lockfName = $lockFilename . getmypid();
|
$lockfName = $lockFilename . getmypid();
|
||||||
$lockfile = $lockdir . $lockfName;
|
$lockfile = $lockdir . $lockfName;
|
||||||
|
|
||||||
// guess the syscp installation path
|
// guess the froxlor installation path
|
||||||
// normally you should not need to modify this script anymore, if your
|
// normally you should not need to modify this script anymore, if your
|
||||||
// syscp installation isn't in /var/www/syscp
|
// froxlor installation isn't in /var/www/froxlor
|
||||||
|
|
||||||
$pathtophpfiles = dirname(dirname(__FILE__));
|
$pathtophpfiles = dirname(dirname(__FILE__));
|
||||||
|
|
||||||
// should the syscp installation guessing not work correctly,
|
// should the froxlor installation guessing not work correctly,
|
||||||
// uncomment the following line, and put your path in there!
|
// uncomment the following line, and put your path in there!
|
||||||
//$pathtophpfiles = '/var/www/syscp/';
|
//$pathtophpfiles = '/var/www/froxlor/';
|
||||||
// create and open the lockfile!
|
// create and open the lockfile!
|
||||||
|
|
||||||
$keepLockFile = false;
|
$keepLockFile = false;
|
||||||
$debugHandler = fopen($lockfile, 'w');
|
$debugHandler = fopen($lockfile, 'w');
|
||||||
fwrite($debugHandler, 'Setting Lockfile to ' . $lockfile . "\n");
|
fwrite($debugHandler, 'Setting Lockfile to ' . $lockfile . "\n");
|
||||||
fwrite($debugHandler, 'Setting SysCP installation path to ' . $pathtophpfiles . "\n");
|
fwrite($debugHandler, 'Setting Froxlor installation path to ' . $pathtophpfiles . "\n");
|
||||||
|
|
||||||
// open the lockfile directory and scan for existing lockfiles
|
// open the lockfile directory and scan for existing lockfiles
|
||||||
|
|
||||||
@@ -168,7 +168,7 @@ if($db->link_id == 0)
|
|||||||
|
|
||||||
fclose($debugHandler);
|
fclose($debugHandler);
|
||||||
unlink($lockfile);
|
unlink($lockfile);
|
||||||
die('SysCP can\'t connect to mysqlserver. Please check userdata.inc.php! Exiting...');
|
die('Froxlor can\'t connect to mysqlserver. Please check userdata.inc.php! Exiting...');
|
||||||
}
|
}
|
||||||
|
|
||||||
fwrite($debugHandler, 'Database-connection established' . "\n");
|
fwrite($debugHandler, 'Database-connection established' . "\n");
|
||||||
@@ -183,10 +183,10 @@ while($row = $db->fetch_array($result))
|
|||||||
|
|
||||||
unset($row);
|
unset($row);
|
||||||
unset($result);
|
unset($result);
|
||||||
fwrite($debugHandler, 'SysCP Settings has been loaded from the database' . "\n");
|
fwrite($debugHandler, 'Froxlor Settings has been loaded from the database' . "\n");
|
||||||
|
|
||||||
if(!isset($settings['system']['dbversion'])
|
if(!isset($settings['panel']['version'])
|
||||||
|| $settings['system']['dbversion'] != $dbversion)
|
|| $settings['panel']['version'] != $version)
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Do not proceed further if the Database version is not the same as the script version
|
* Do not proceed further if the Database version is not the same as the script version
|
||||||
@@ -197,7 +197,7 @@ if(!isset($settings['system']['dbversion'])
|
|||||||
die('Version of File doesnt match Version of Database. Exiting...');
|
die('Version of File doesnt match Version of Database. Exiting...');
|
||||||
}
|
}
|
||||||
|
|
||||||
fwrite($debugHandler, 'SysCP Version and Database Version are correct' . "\n");
|
fwrite($debugHandler, 'Froxlor Version and Database Version are correct' . "\n");
|
||||||
|
|
||||||
$cronbasedir = makeCorrectDir($pathtophpfiles . '/scripts/');
|
$cronbasedir = makeCorrectDir($pathtophpfiles . '/scripts/');
|
||||||
$crondir = new DirectoryIterator($cronbasedir);
|
$crondir = new DirectoryIterator($cronbasedir);
|
||||||
@@ -238,6 +238,12 @@ if(isset($inc_crons[0]))
|
|||||||
unset($file, $crondir, $cronname, $cronscriptFullName, $cronfilename, $cronbasedir);
|
unset($file, $crondir, $cronname, $cronscriptFullName, $cronfilename, $cronbasedir);
|
||||||
fwrite($debugHandler, 'Functions have been included' . "\n");
|
fwrite($debugHandler, 'Functions have been included' . "\n");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new idna converter
|
||||||
|
*/
|
||||||
|
|
||||||
|
$idna_convert = new idna_convert_wrapper();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize logging
|
* Initialize logging
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ function createAWStatsConf($logFile, $siteDomain, $hostAliases)
|
|||||||
// File names
|
// File names
|
||||||
|
|
||||||
$domain_file = '/etc/awstats/awstats.' . $siteDomain . '.conf';
|
$domain_file = '/etc/awstats/awstats.' . $siteDomain . '.conf';
|
||||||
$model_file = '/etc/awstats/awstats.model.conf.syscp';
|
$model_file = '/etc/awstats/awstats.model.conf.froxlor';
|
||||||
|
|
||||||
// Test if the file exists
|
// Test if the file exists
|
||||||
|
|
||||||
|
|||||||
@@ -52,16 +52,22 @@ function inserttask($type, $param1 = '', $param2 = '', $param3 = '')
|
|||||||
$doupdate = true;
|
$doupdate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Taken from https://wiki.syscp.org/contrib/realtime
|
|
||||||
|
|
||||||
if($doupdate === true
|
if($doupdate === true
|
||||||
&& (int)$settings['system']['realtime_port'] !== 0)
|
&& (int)$settings['system']['realtime_port'] !== 0)
|
||||||
{
|
{
|
||||||
$timeout = 15;
|
$timeout = 15;
|
||||||
$socket = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
|
$socket = @socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
|
||||||
|
|
||||||
if($socket !== false)
|
if($socket !== false)
|
||||||
{
|
{
|
||||||
|
// create the request packet
|
||||||
|
$packet = chr(0) . chr(1) . 'RUN' . chr(0);
|
||||||
|
// UDP is connectionless, so we just send on it.
|
||||||
|
@socket_sendto($socket, $packet, strlen($packet), 0x100, '127.0.0.1', (int)$settings['system']['realtime_port']);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* this is for TCP-Connections
|
||||||
|
*
|
||||||
$time = time();
|
$time = time();
|
||||||
|
|
||||||
while(!@socket_connect($socket, '127.0.0.1', (int)$settings['system']['realtime_port']))
|
while(!@socket_connect($socket, '127.0.0.1', (int)$settings['system']['realtime_port']))
|
||||||
@@ -80,7 +86,7 @@ function inserttask($type, $param1 = '', $param2 = '', $param3 = '')
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
@socket_close($socket);
|
@socket_close($socket);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ $lng['question']['extras_reallydelete'] = 'Do you really want to delete the dire
|
|||||||
$lng['question']['extras_reallydelete_pathoptions'] = 'Do you really want to delete the path options for %s?';
|
$lng['question']['extras_reallydelete_pathoptions'] = 'Do you really want to delete the path options for %s?';
|
||||||
$lng['question']['ftp_reallydelete'] = 'Do you really want to delete the FTP account %s?';
|
$lng['question']['ftp_reallydelete'] = 'Do you really want to delete the FTP account %s?';
|
||||||
$lng['question']['mysql_reallydelete'] = 'Do you really want to delete the database %s? This cannot be undone!';
|
$lng['question']['mysql_reallydelete'] = 'Do you really want to delete the database %s? This cannot be undone!';
|
||||||
$lng['question']['admin_configs_reallyrebuild'] = 'Do you really want to rebuild your apache and bind config files?';
|
$lng['question']['admin_configs_reallyrebuild'] = 'Do you really want to rebuild all config files?';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mails
|
* Mails
|
||||||
@@ -1218,10 +1218,6 @@ $lng['admin']['webserver'] = 'Webserver';
|
|||||||
$lng['error']['admin_domain_emailsystemhostname'] = 'The server-hostname cannot be used as email-domain.';
|
$lng['error']['admin_domain_emailsystemhostname'] = 'The server-hostname cannot be used as email-domain.';
|
||||||
$lng['aps']['license_link'] = 'Link to the license';
|
$lng['aps']['license_link'] = 'Link to the license';
|
||||||
|
|
||||||
// ADDED IN 1.4.2.1
|
|
||||||
$lng['admin']['thankyou'] = 'Thank you';
|
|
||||||
$lng['admin']['contributors'] = 'All these people contributed to the Froxlor Project (no particular order)';
|
|
||||||
|
|
||||||
// ADDED IN 1.4.2.1-1
|
// ADDED IN 1.4.2.1-1
|
||||||
|
|
||||||
$lng['mysql']['mysql_server'] = 'MySQL-Server';
|
$lng['mysql']['mysql_server'] = 'MySQL-Server';
|
||||||
@@ -1245,4 +1241,11 @@ $lng['error']['errorwhensaving'] = 'An error occured when saving the field %s';
|
|||||||
$lng['success']['success'] = 'Information';
|
$lng['success']['success'] = 'Information';
|
||||||
$lng['success']['clickheretocontinue'] = 'Click here to continue';
|
$lng['success']['clickheretocontinue'] = 'Click here to continue';
|
||||||
$lng['success']['settingssaved'] = 'The settings have been successfully saved.';
|
$lng['success']['settingssaved'] = 'The settings have been successfully saved.';
|
||||||
?>
|
|
||||||
|
// ADDED IN FROXLOR 0.9
|
||||||
|
|
||||||
|
$lng['admin']['spfsettings'] = 'Domain SPF settings';
|
||||||
|
$lng['spf']['use_spf'] = 'Activate SPF for domains?';
|
||||||
|
$lng['spf']['spf_entry'] = 'SPF entry for all domains';
|
||||||
|
|
||||||
|
?>
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ $lng['question']['extras_reallydelete'] = 'Wollen Sie den Verzeichnisschutz f&uu
|
|||||||
$lng['question']['extras_reallydelete_pathoptions'] = 'Wollen Sie die Optionen für den Pfad %s wirklich löschen?';
|
$lng['question']['extras_reallydelete_pathoptions'] = 'Wollen Sie die Optionen für den Pfad %s wirklich löschen?';
|
||||||
$lng['question']['ftp_reallydelete'] = 'Wollen Sie das FTP-Benutzerkonto %s wirklich löschen?';
|
$lng['question']['ftp_reallydelete'] = 'Wollen Sie das FTP-Benutzerkonto %s wirklich löschen?';
|
||||||
$lng['question']['mysql_reallydelete'] = 'Wollen Sie die Datenbank %s wirklich löschen?<br />ACHTUNG! Alle Daten gehen unwiderruflich verloren!';
|
$lng['question']['mysql_reallydelete'] = 'Wollen Sie die Datenbank %s wirklich löschen?<br />ACHTUNG! Alle Daten gehen unwiderruflich verloren!';
|
||||||
$lng['question']['admin_configs_reallyrebuild'] = 'Wollen Sie wirklich Ihre Apache und Bind Konfigurationsdateien neu erstellen lassen?';
|
$lng['question']['admin_configs_reallyrebuild'] = 'Wollen Sie wirklich alle Konfigurationsdateien neu erstellen lassen?';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mails
|
* Mails
|
||||||
@@ -270,7 +270,7 @@ $lng['mails']['createcustomer']['subject'] = 'Kontoinformationen';
|
|||||||
$lng['admin']['overview'] = 'Übersicht';
|
$lng['admin']['overview'] = 'Übersicht';
|
||||||
$lng['admin']['ressourcedetails'] = 'Verbrauchte Ressourcen';
|
$lng['admin']['ressourcedetails'] = 'Verbrauchte Ressourcen';
|
||||||
$lng['admin']['systemdetails'] = 'Systemdetails';
|
$lng['admin']['systemdetails'] = 'Systemdetails';
|
||||||
$lng['admin']['syscpdetails'] = 'SysCP-Details';
|
$lng['admin']['syscpdetails'] = 'Froxlor-Details';
|
||||||
$lng['admin']['installedversion'] = 'Installierte Version';
|
$lng['admin']['installedversion'] = 'Installierte Version';
|
||||||
$lng['admin']['latestversion'] = 'Neueste Version';
|
$lng['admin']['latestversion'] = 'Neueste Version';
|
||||||
$lng['admin']['lookfornewversion']['clickhere'] = 'per Webservice abfragen';
|
$lng['admin']['lookfornewversion']['clickhere'] = 'per Webservice abfragen';
|
||||||
@@ -1222,8 +1222,10 @@ $lng['admin']['webserver'] = 'Webserver';
|
|||||||
$lng['error']['admin_domain_emailsystemhostname'] = 'Der Server-Hostname kann leider nicht als E-Mail-Domain verwendet werden.';
|
$lng['error']['admin_domain_emailsystemhostname'] = 'Der Server-Hostname kann leider nicht als E-Mail-Domain verwendet werden.';
|
||||||
$lng['aps']['license_link'] = 'Link zur Lizenz';
|
$lng['aps']['license_link'] = 'Link zur Lizenz';
|
||||||
|
|
||||||
// ADDED IN 1.4.2.1
|
// ADDED IN FROXLOR 0.9
|
||||||
$lng['admin']['thankyou'] = 'Vielen Dank';
|
|
||||||
$lng['admin']['contributors'] = 'Diese Leute haben zum Froxlor Projekt beigetragen (keine besondere Ordnung)';
|
|
||||||
|
|
||||||
?>
|
$lng['admin']['spfsettings'] = 'Domain SPF Einstellungen';
|
||||||
|
$lng['spf']['use_spf'] = 'Aktiviere SPF für Domains?';
|
||||||
|
$lng['spf']['spf_entry'] = 'SPF Eintrag für alle Domains';
|
||||||
|
|
||||||
|
?>
|
||||||
|
|||||||
@@ -79,8 +79,8 @@ class bind
|
|||||||
|
|
||||||
public function writeConfigs()
|
public function writeConfigs()
|
||||||
{
|
{
|
||||||
fwrite($this->debugHandler, ' cron_tasks: Task4 started - Rebuilding syscp_bind.conf' . "\n");
|
fwrite($this->debugHandler, ' cron_tasks: Task4 started - Rebuilding froxlor_bind.conf' . "\n");
|
||||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'Task4 started - Rebuilding syscp_bind.conf');
|
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'Task4 started - Rebuilding froxlor_bind.conf');
|
||||||
|
|
||||||
if(!file_exists(makeCorrectDir($this->settings['system']['bindconf_directory'] . '/domains/')))
|
if(!file_exists(makeCorrectDir($this->settings['system']['bindconf_directory'] . '/domains/')))
|
||||||
{
|
{
|
||||||
@@ -90,7 +90,7 @@ class bind
|
|||||||
|
|
||||||
$known_filenames = array();
|
$known_filenames = array();
|
||||||
|
|
||||||
$bindconf_file = '# ' . $this->settings['system']['bindconf_directory'] . 'syscp_bind.conf' . "\n" . '# Created ' . date('d.m.Y H:i') . "\n" . '# Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.' . "\n" . "\n";
|
$bindconf_file = '# ' . $this->settings['system']['bindconf_directory'] . 'froxlor_bind.conf' . "\n" . '# Created ' . date('d.m.Y H:i') . "\n" . '# Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.' . "\n" . "\n";
|
||||||
$result_domains = $this->db->query("SELECT `d`.`id`, `d`.`domain`, `d`.`iswildcarddomain`, `d`.`customerid`, `d`.`zonefile`, `d`.`bindserial`, `d`.`dkim`, `d`.`dkim_id`, `d`.`dkim_pubkey`, `ip`.`ip`, `c`.`loginname`, `c`.`guid` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) LEFT JOIN `" . TABLE_PANEL_IPSANDPORTS . "` AS `ip` ON(`d`.`ipandport`=`ip`.`id`) WHERE `d`.`isbinddomain` = '1' ORDER BY `d`.`domain` ASC");
|
$result_domains = $this->db->query("SELECT `d`.`id`, `d`.`domain`, `d`.`iswildcarddomain`, `d`.`customerid`, `d`.`zonefile`, `d`.`bindserial`, `d`.`dkim`, `d`.`dkim_id`, `d`.`dkim_pubkey`, `ip`.`ip`, `c`.`loginname`, `c`.`guid` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) LEFT JOIN `" . TABLE_PANEL_IPSANDPORTS . "` AS `ip` ON(`d`.`ipandport`=`ip`.`id`) WHERE `d`.`isbinddomain` = '1' ORDER BY `d`.`domain` ASC");
|
||||||
|
|
||||||
while($domain = $this->db->fetch_array($result_domains))
|
while($domain = $this->db->fetch_array($result_domains))
|
||||||
@@ -131,11 +131,11 @@ class bind
|
|||||||
$bindconf_file.= "\n";
|
$bindconf_file.= "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$bindconf_file_handler = fopen(makeCorrectFile($this->settings['system']['bindconf_directory'] . '/syscp_bind.conf'), 'w');
|
$bindconf_file_handler = fopen(makeCorrectFile($this->settings['system']['bindconf_directory'] . '/froxlor_bind.conf'), 'w');
|
||||||
fwrite($bindconf_file_handler, $bindconf_file);
|
fwrite($bindconf_file_handler, $bindconf_file);
|
||||||
fclose($bindconf_file_handler);
|
fclose($bindconf_file_handler);
|
||||||
fwrite($this->debugHandler, ' cron_tasks: Task4 - syscp_bind.conf written' . "\n");
|
fwrite($this->debugHandler, ' cron_tasks: Task4 - froxlor_bind.conf written' . "\n");
|
||||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'syscp_bind.conf written');
|
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'froxlor_bind.conf written');
|
||||||
safe_exec($this->settings['system']['bindreload_command']);
|
safe_exec($this->settings['system']['bindreload_command']);
|
||||||
fwrite($this->debugHandler, ' cron_tasks: Task4 - Bind9 reloaded' . "\n");
|
fwrite($this->debugHandler, ' cron_tasks: Task4 - Bind9 reloaded' . "\n");
|
||||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'Bind9 reloaded');
|
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'Bind9 reloaded');
|
||||||
@@ -216,7 +216,14 @@ class bind
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$zonefile.= '@ IN TXT "v=spf1 a mx -all"' . "\n";
|
/*
|
||||||
|
* @TODO domain-based spf-settings
|
||||||
|
*/
|
||||||
|
if($this->settings['spf']['use_spf'] == '1'
|
||||||
|
/*&& $domain['spf'] == '1' */)
|
||||||
|
{
|
||||||
|
$zonefile.= $this->settings['spf']['spf_entry'] . "\n";
|
||||||
|
}
|
||||||
|
|
||||||
if($this->settings['dkim']['use_dkim'] == '1'
|
if($this->settings['dkim']['use_dkim'] == '1'
|
||||||
&& $domain['dkim'] == '1'
|
&& $domain['dkim'] == '1'
|
||||||
|
|||||||
@@ -26,10 +26,14 @@ if(@php_sapi_name() != 'cli'
|
|||||||
|
|
||||||
class apache
|
class apache
|
||||||
{
|
{
|
||||||
protected $db = false;
|
private $db = false;
|
||||||
protected $logger = false;
|
private $logger = false;
|
||||||
protected $debugHandler = false;
|
private $debugHandler = false;
|
||||||
protected $settings = array();
|
private $idnaConvert = false;
|
||||||
|
private $settings = array();
|
||||||
|
|
||||||
|
// protected
|
||||||
|
|
||||||
protected $known_vhostfilenames = array();
|
protected $known_vhostfilenames = array();
|
||||||
protected $known_diroptionsfilenames = array();
|
protected $known_diroptionsfilenames = array();
|
||||||
protected $known_htpasswdsfilenames = array();
|
protected $known_htpasswdsfilenames = array();
|
||||||
@@ -37,11 +41,12 @@ class apache
|
|||||||
protected $diroptions_data = array();
|
protected $diroptions_data = array();
|
||||||
protected $htpasswds_data = array();
|
protected $htpasswds_data = array();
|
||||||
|
|
||||||
public function __construct($db, $logger, $debugHandler, $settings)
|
public function __construct($db, $logger, $debugHandler, $idnaConvert, $settings)
|
||||||
{
|
{
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->logger = $logger;
|
$this->logger = $logger;
|
||||||
$this->debugHandler = $debugHandler;
|
$this->debugHandler = $debugHandler;
|
||||||
|
$this->idnaConvert = $idnaConvert;
|
||||||
$this->settings = $settings;
|
$this->settings = $settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -293,7 +298,7 @@ class apache
|
|||||||
|
|
||||||
if($this->settings['system']['awstats_enabled'] == '1')
|
if($this->settings['system']['awstats_enabled'] == '1')
|
||||||
{
|
{
|
||||||
$stats_text.= createAWStatsVhost($domain['domain']);
|
$stats_text.= createAWStatsVhost($domain['domain'], $this->settings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -302,7 +307,7 @@ class apache
|
|||||||
|
|
||||||
if($this->settings['system']['awstats_enabled'] == '1')
|
if($this->settings['system']['awstats_enabled'] == '1')
|
||||||
{
|
{
|
||||||
$stats_text.= createAWStatsVhost($domain['parentdomain']);
|
$stats_text.= createAWStatsVhost($domain['parentdomain'], $this->settings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -315,7 +320,7 @@ class apache
|
|||||||
|
|
||||||
if($this->settings['system']['awstats_enabled'] == '1')
|
if($this->settings['system']['awstats_enabled'] == '1')
|
||||||
{
|
{
|
||||||
$stats_text.= createAWStatsVhost($domain['domain']);
|
$stats_text.= createAWStatsVhost($domain['domain'], $this->settings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -482,7 +487,7 @@ class apache
|
|||||||
|
|
||||||
if(preg_match('/^https?\:\/\//', $domain['documentroot']))
|
if(preg_match('/^https?\:\/\//', $domain['documentroot']))
|
||||||
{
|
{
|
||||||
$vhost_content.= ' Redirect 301 / ' . $domain['documentroot'] . "\n";
|
$vhost_content.= ' Redirect 301 / ' . $this->idnaConvert->encode($domain['documentroot']) . "\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ class lighttpd
|
|||||||
private $db = false;
|
private $db = false;
|
||||||
private $logger = false;
|
private $logger = false;
|
||||||
private $debugHandler = false;
|
private $debugHandler = false;
|
||||||
|
private $idnaConvert = false;
|
||||||
private $settings = array();
|
private $settings = array();
|
||||||
|
|
||||||
// protected
|
// protected
|
||||||
@@ -42,11 +43,12 @@ class lighttpd
|
|||||||
public $mod_accesslog_loaded = "0";
|
public $mod_accesslog_loaded = "0";
|
||||||
protected $lighttpd_data = array();
|
protected $lighttpd_data = array();
|
||||||
|
|
||||||
function __construct($db, $logger, $debugHandler, $settings)
|
function __construct($db, $logger, $debugHandler, $idnaConvert, $settings)
|
||||||
{
|
{
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->logger = $logger;
|
$this->logger = $logger;
|
||||||
$this->debugHandler = $debugHandler;
|
$this->debugHandler = $debugHandler;
|
||||||
|
$this->idnaConvert = $idnaConvert;
|
||||||
$this->settings = $settings;
|
$this->settings = $settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,7 +79,7 @@ class lighttpd
|
|||||||
|
|
||||||
fwrite($this->debugHandler, ' lighttpd::createIpPort: creating ip/port settings for ' . $ip . ":" . $port . "\n");
|
fwrite($this->debugHandler, ' lighttpd::createIpPort: creating ip/port settings for ' . $ip . ":" . $port . "\n");
|
||||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'creating ip/port settings for ' . $ip . ":" . $port);
|
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'creating ip/port settings for ' . $ip . ":" . $port);
|
||||||
$vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/10_syscp_ipandport_' . trim(str_replace(':', '.', $row_ipsandports['ip']), '.') . '.' . $row_ipsandports['port'] . '.conf');
|
$vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/10_froxlor_ipandport_' . trim(str_replace(':', '.', $row_ipsandports['ip']), '.') . '.' . $row_ipsandports['port'] . '.conf');
|
||||||
$this->lighttpd_data[$vhost_filename].= '$SERVER["socket"] == "' . $ip . ':' . $port . '" {' . "\n";
|
$this->lighttpd_data[$vhost_filename].= '$SERVER["socket"] == "' . $ip . ':' . $port . '" {' . "\n";
|
||||||
|
|
||||||
if($row_ipsandports['listen_statement'] == '1')
|
if($row_ipsandports['listen_statement'] == '1')
|
||||||
@@ -159,6 +161,10 @@ class lighttpd
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function composePhpOptions()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
protected function createLighttpdHosts($ip, $port, $ssl, $vhost_filename)
|
protected function createLighttpdHosts($ip, $port, $ssl, $vhost_filename)
|
||||||
{
|
{
|
||||||
$query = "SELECT * FROM " . TABLE_PANEL_IPSANDPORTS . " WHERE `ip`='" . $ip . "' AND `port`='" . $port . "'";
|
$query = "SELECT * FROM " . TABLE_PANEL_IPSANDPORTS . " WHERE `ip`='" . $ip . "' AND `port`='" . $port . "'";
|
||||||
@@ -235,6 +241,7 @@ class lighttpd
|
|||||||
$vhost_content.= $this->getWebroot($domain, $ssl_vhost);
|
$vhost_content.= $this->getWebroot($domain, $ssl_vhost);
|
||||||
$vhost_content.= $this->create_htaccess($domain);
|
$vhost_content.= $this->create_htaccess($domain);
|
||||||
$vhost_content.= $this->create_pathOptions($domain);
|
$vhost_content.= $this->create_pathOptions($domain);
|
||||||
|
$vhost_content.= $this->composePhpOptions($domain);
|
||||||
$vhost_content.= $this->getLogFiles($domain);
|
$vhost_content.= $this->getLogFiles($domain);
|
||||||
$vhost_content.= '}' . "\n";
|
$vhost_content.= '}' . "\n";
|
||||||
return $vhost_content;
|
return $vhost_content;
|
||||||
@@ -393,6 +400,7 @@ class lighttpd
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$server_string[] = $domain_name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -445,7 +453,13 @@ class lighttpd
|
|||||||
}
|
}
|
||||||
|
|
||||||
unset($data);
|
unset($data);
|
||||||
$servernames_text = '$HTTP["host"] =~ "' . $servernames_text . '"';
|
|
||||||
|
if($servernames_text != '') {
|
||||||
|
$servernames_text = '$HTTP["host"] =~ "' . $servernames_text . '"';
|
||||||
|
} else {
|
||||||
|
$servernames_text = '$HTTP["host"] == "' . $domain['domain'] . '"';
|
||||||
|
}
|
||||||
|
|
||||||
return $servernames_text;
|
return $servernames_text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -464,11 +478,21 @@ class lighttpd
|
|||||||
if($ssl === false
|
if($ssl === false
|
||||||
&& $domain['ssl_redirect'] == '1')
|
&& $domain['ssl_redirect'] == '1')
|
||||||
{
|
{
|
||||||
$webroot_text.= ' url.redirect = ( "^/(.*)" => "https://' . $domain['domain'] . '/$1" )' . "\n";
|
$redirect_domain = $this->idnaConvert->encode('https://' . $domain['domain']);
|
||||||
|
$webroot_text.= ' url.redirect = ('."\n";
|
||||||
|
$webroot_text.= "\t" . '"^/(.*)" => "' . $redirect_domain . '/$1",' . "\n";
|
||||||
|
$webroot_text.= "\t" . '"" => "' . $redirect_domain . '",' . "\n";
|
||||||
|
$webroot_text.= "\t" . '"/" => "' . $redirect_domain . '"' . "\n";
|
||||||
|
$webroot_text.= ' )'."\n";
|
||||||
}
|
}
|
||||||
elseif(preg_match("#^https?://#i", $domain['documentroot']))
|
elseif(preg_match("#^https?://#i", $domain['documentroot']))
|
||||||
{
|
{
|
||||||
$webroot_text.= ' url.redirect = ( "^/(.*)" => "' . $domain['documentroot'] . '/$1" )' . "\n";
|
$redirect_domain = $this->idnaConvert->encode($domain['documentroot']);
|
||||||
|
$webroot_text.= ' url.redirect = ('."\n";
|
||||||
|
$webroot_text.= "\t" . '"^/(.*)" => "' . $redirect_domain . '/$1",' . "\n";
|
||||||
|
$webroot_text.= "\t" . '"" => "' . $redirect_domain . '",' . "\n";
|
||||||
|
$webroot_text.= "\t" . '"/" => "' . $redirect_domain . '"' . "\n";
|
||||||
|
$webroot_text.= ' )'."\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -553,7 +577,7 @@ class lighttpd
|
|||||||
|
|
||||||
private function wipeOutOldConfigs()
|
private function wipeOutOldConfigs()
|
||||||
{
|
{
|
||||||
fwrite($this->debugHandler, ' apache::wipeOutOldConfigs: cleaning ' . $this->settings['system']['apacheconf_vhost'] . "\n");
|
fwrite($this->debugHandler, ' lighttpd::wipeOutOldConfigs: cleaning ' . $this->settings['system']['apacheconf_vhost'] . "\n");
|
||||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, "cleaning " . $this->settings['system']['apacheconf_vhost']);
|
$this->logger->logAction(CRON_ACTION, LOG_INFO, "cleaning " . $this->settings['system']['apacheconf_vhost']);
|
||||||
|
|
||||||
if(isConfigDir($this->settings['system']['apacheconf_vhost'])
|
if(isConfigDir($this->settings['system']['apacheconf_vhost'])
|
||||||
@@ -567,10 +591,10 @@ class lighttpd
|
|||||||
if($vhost_filename != '.'
|
if($vhost_filename != '.'
|
||||||
&& $vhost_filename != '..'
|
&& $vhost_filename != '..'
|
||||||
&& !in_array($vhost_filename, $this->known_filenames)
|
&& !in_array($vhost_filename, $this->known_filenames)
|
||||||
&& preg_match('/^(10|20|30)_syscp_ipandport_(.+)\.conf$/', $vhost_filename)
|
&& preg_match('/^(10|20|30)_froxlor_ipandport_(.+)\.conf$/', $vhost_filename)
|
||||||
&& file_exists(makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/' . $vhost_filename)))
|
&& file_exists(makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/' . $vhost_filename)))
|
||||||
{
|
{
|
||||||
fwrite($this->debugHandler, ' apache::wipeOutOldConfigs: unlinking ' . $vhost_filename . "\n");
|
fwrite($this->debugHandler, ' lighttpd::wipeOutOldConfigs: unlinking ' . $vhost_filename . "\n");
|
||||||
$this->logger->logAction(CRON_ACTION, LOG_NOTICE, 'unlinking ' . $vhost_filename);
|
$this->logger->logAction(CRON_ACTION, LOG_NOTICE, 'unlinking ' . $vhost_filename);
|
||||||
unlink(makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/' . $vhost_filename));
|
unlink(makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/' . $vhost_filename));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,261 +28,10 @@ if(@php_sapi_name() != 'cli'
|
|||||||
|
|
||||||
class lighttpd_fcgid extends lighttpd
|
class lighttpd_fcgid extends lighttpd
|
||||||
{
|
{
|
||||||
private $db = false;
|
private $php_configs_cache = array();
|
||||||
private $logger = false;
|
private $admin_cache = array();
|
||||||
private $debugHandler = false;
|
|
||||||
private $settings = array();
|
|
||||||
|
|
||||||
// protected
|
protected function composePhpOptions($domain)
|
||||||
|
|
||||||
public $needed_htpasswds = array();
|
|
||||||
public $auth_backend_loaded = false;
|
|
||||||
public $htpasswd_files = array();
|
|
||||||
public $mod_accesslog_loaded = "0";
|
|
||||||
protected $lighttpd_data = array();
|
|
||||||
|
|
||||||
function __construct($db, $logger, $debugHandler, $settings)
|
|
||||||
{
|
|
||||||
$this->db = $db;
|
|
||||||
$this->logger = $logger;
|
|
||||||
$this->debugHandler = $debugHandler;
|
|
||||||
$this->settings = $settings;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function reload()
|
|
||||||
{
|
|
||||||
fwrite($this->debugHandler, ' lighttpd::reload: reloading lighttpd' . "\n");
|
|
||||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'reloading apache');
|
|
||||||
safe_exec($this->settings['system']['apachereload_command']);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function createIpPort()
|
|
||||||
{
|
|
||||||
$query = "SELECT `id`, `ip`, `port`, `listen_statement`, `namevirtualhost_statement`, `vhostcontainer`, " . " `vhostcontainer_servername_statement`, `specialsettings`, `ssl`, `ssl_cert_file` " . " FROM `" . TABLE_PANEL_IPSANDPORTS . "` ORDER BY `ip` ASC, `port` ASC";
|
|
||||||
$result_ipsandports = $this->db->query($query);
|
|
||||||
|
|
||||||
while($row_ipsandports = $this->db->fetch_array($result_ipsandports))
|
|
||||||
{
|
|
||||||
if(filter_var($row_ipsandports['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6))
|
|
||||||
{
|
|
||||||
$ip = '[' . $row_ipsandports['ip'] . ']';
|
|
||||||
$port = $row_ipsandports['port'];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$ip = $row_ipsandports['ip'];
|
|
||||||
$port = $row_ipsandports['port'];
|
|
||||||
}
|
|
||||||
|
|
||||||
fwrite($this->debugHandler, ' lighttpd::createIpPort: creating ip/port settings for ' . $ip . ":" . $port . "\n");
|
|
||||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'creating ip/port settings for ' . $ip . ":" . $port);
|
|
||||||
$vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/10_syscp_ipandport_' . trim(str_replace(':', '.', $row_ipsandports['ip']), '.') . '.' . $row_ipsandports['port'] . '.conf');
|
|
||||||
$this->lighttpd_data[$vhost_filename].= '$SERVER["socket"] == "' . $ip . ':' . $port . '" {' . "\n";
|
|
||||||
|
|
||||||
if($row_ipsandports['listen_statement'] == '1')
|
|
||||||
{
|
|
||||||
$this->lighttpd_data[$vhost_filename].= 'server.port = ' . $port . "\n";
|
|
||||||
$this->lighttpd_data[$vhost_filename].= 'server.bind = "' . $ip . '"' . "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
if($row_ipsandports['ssl'] == '1')
|
|
||||||
{
|
|
||||||
$this->lighttpd_data[$vhost_filename].= 'ssl.engine = "enable"' . "\n";
|
|
||||||
$this->lighttpd_data[$vhost_filename].= 'ssl.pemfile = "' . $row_ipsandports['ssl_cert_file'] . '"' . "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->createLighttpdHosts($row_ipsandports['ip'], $row_ipsandports['port'], $row_ipsandports['ssl'], $vhost_filename);
|
|
||||||
$this->lighttpd_data[$vhost_filename].= $this->needed_htpasswds[$row_ipsandports['id']] . "\n";
|
|
||||||
$this->lighttpd_data[$vhost_filename].= '}' . "\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function create_htaccess($domain)
|
|
||||||
{
|
|
||||||
$needed_htpasswds = array();
|
|
||||||
$htpasswd_query = "SELECT * FROM " . TABLE_PANEL_HTPASSWDS . " WHERE `path` LIKE '" . $domain['documentroot'] . "%'";
|
|
||||||
$result_htpasswds = $this->db->query($htpasswd_query);
|
|
||||||
|
|
||||||
while($row_htpasswds = $this->db->fetch_array($result_htpasswds))
|
|
||||||
{
|
|
||||||
$filename = $row_htpasswds['customerid'] . '-' . md5($row_htpasswds['path']) . '.htpasswd';
|
|
||||||
|
|
||||||
if(!in_array($row_htpasswds['path'], $needed_htpasswds))
|
|
||||||
{
|
|
||||||
if(empty($needed_htpasswds))
|
|
||||||
{
|
|
||||||
$auth_backend_loaded[$domain['ipandport']] = 'yes';
|
|
||||||
|
|
||||||
if(!$this->auth_backend_loaded)
|
|
||||||
{
|
|
||||||
$htaccess_text.= ' auth.backend = "htpasswd"' . "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
$htaccess_text.= ' auth.backend.htpasswd.userfile = "' . makeCorrectFile($this->settings['system']['apacheconf_htpasswddir'] . '/' . $filename) . '"' . "\n";
|
|
||||||
$htaccess_text.= ' auth.require = ( ' . "\n";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$htaccess_text.= ' ,' . "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!strstr($this->needed_htpasswds[$filename], $row_htpasswds['username'] . ':' . $row_htpasswds['password']))
|
|
||||||
{
|
|
||||||
$this->needed_htpasswds[$filename].= $row_htpasswds['username'] . ':' . $row_htpasswds['password'] . "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
$needed_htpasswds[] = $row_htpasswds['path'];
|
|
||||||
$htaccess_path = substr($row_htpasswds['path'], strlen($domain['documentroot']) - 1);
|
|
||||||
$htaccess_text.= ' "' . makeCorrectDir($htaccess_path) . '" =>' . "\n";
|
|
||||||
$htaccess_text.= ' (' . "\n";
|
|
||||||
$htaccess_text.= ' "method" => "basic",' . "\n";
|
|
||||||
$htaccess_text.= ' "realm" => "Restricted Area",' . "\n";
|
|
||||||
$htaccess_text.= ' "require" => "user=' . $row_htpasswds[username] . '"' . "\n";
|
|
||||||
$htaccess_text.= ' )' . "\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(strlen(trim($htaccess_text)) > 0)
|
|
||||||
{
|
|
||||||
$htaccess_text.= ' )' . "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
return $htaccess_text;
|
|
||||||
}
|
|
||||||
|
|
||||||
function createVirtualHosts()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
function createFileDirOptions()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function createLighttpdHosts($ip, $port, $ssl, $vhost_filename)
|
|
||||||
{
|
|
||||||
$query = "SELECT * FROM " . TABLE_PANEL_IPSANDPORTS . " WHERE `ip`='" . $ip . "' AND `port`='" . $port . "'";
|
|
||||||
$ipandport = $this->db->query_first($query);
|
|
||||||
|
|
||||||
if($ssl == '0')
|
|
||||||
{
|
|
||||||
$query2 = "SELECT `d`.`id`, `d`.`domain`, `d`.`customerid`, `d`.`documentroot`, `d`.`ssl`, " . "`d`.`parentdomainid`, `d`.`ipandport`, `d`.`ssl_ipandport`, `d`.`ssl_redirect`, " . "`d`.`isemaildomain`, `d`.`iswildcarddomain`, `d`.`wwwserveralias`, `d`.`openbasedir`, `d`.`openbasedir_path`, " . "`d`.`safemode`, `d`.`speciallogfile`, `d`.`specialsettings`, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, " . "`c`.`guid`, `c`.`email`, `c`.`documentroot` AS `customerroot`, `c`.`deactivated`, `c`.`phpenabled` AS `phpenabled` " . "FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) " . "LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON (`pd`.`id` = `d`.`parentdomainid`) " . "WHERE `d`.`ipandport`='" . $ipandport['id'] . "' " . "ORDER BY `d`.`iswildcarddomain`, `d`.`domain` ASC";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$query2.= "SELECT `d`.`id`, `d`.`domain`, `d`.`customerid`, `d`.`documentroot`, `d`.`ssl`, " . "`d`.`parentdomainid`, `d`.`ipandport`, `d`.`ssl_ipandport`, `d`.`ssl_redirect`, " . "`d`.`isemaildomain`, `d`.`iswildcarddomain`, `d`.`wwwserveralias`, `d`.`openbasedir`, `d`.`openbasedir_path`, " . "`d`.`safemode`, `d`.`speciallogfile`, `d`.`specialsettings`, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, " . "`c`.`guid`, `c`.`email`, `c`.`documentroot` AS `customerroot`, `c`.`deactivated`, `c`.`phpenabled` AS `phpenabled` " . "FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) " . "LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON (`pd`.`id` = `d`.`parentdomainid`) " . "WHERE `d`.`ssl_ipandport`='" . $ipandport['id'] . "' " . "ORDER BY `d`.`iswildcarddomain`, `d`.`domain` ASC";
|
|
||||||
}
|
|
||||||
|
|
||||||
$result_domains = $this->db->query($query2);
|
|
||||||
|
|
||||||
while($domain = $this->db->fetch_array($result_domains))
|
|
||||||
{
|
|
||||||
$query = "SELECT * FROM " . TABLE_PANEL_IPSANDPORTS . " WHERE `id`='" . $domain['ipandport'] . "'";
|
|
||||||
$ipandport = $this->db->query_first($query);
|
|
||||||
$domain['ip'] = $ipandport['ip'];
|
|
||||||
$domain['port'] = $ipandport['port'];
|
|
||||||
$domain['ssl_cert_file'] = $ipandport['ssl_cert_file'];
|
|
||||||
|
|
||||||
if(!empty($this->lighttpd_data[$vhost_filename]))
|
|
||||||
{
|
|
||||||
if($ssl == '1')
|
|
||||||
{
|
|
||||||
$ssl_vhost = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$ssl_vhost = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->lighttpd_data[$vhost_filename].= $this->getVhostContent($domain, $ssl_vhost);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getVhostContent($domain, $ssl_vhost = false)
|
|
||||||
{
|
|
||||||
if($ssl_vhost === true
|
|
||||||
&& $domain['ssl'] != '1')
|
|
||||||
{
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
if($ssl_vhost === true
|
|
||||||
&& $domain['ssl'] == '1')
|
|
||||||
{
|
|
||||||
$query = "SELECT * FROM " . TABLE_PANEL_IPSANDPORTS . " WHERE `id`='" . $domain['ssl_ipandport'] . "'";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$query = "SELECT * FROM " . TABLE_PANEL_IPSANDPORTS . " WHERE `id`='" . $domain['ipandport'] . "'";
|
|
||||||
}
|
|
||||||
|
|
||||||
$ipandport = $this->db->query_first($query);
|
|
||||||
$domain['ip'] = $ipandport['ip'];
|
|
||||||
$domain['port'] = $ipandport['port'];
|
|
||||||
$domain['ssl_cert_file'] = $ipandport['ssl_cert_file'];
|
|
||||||
|
|
||||||
if(filter_var($domain['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6))
|
|
||||||
{
|
|
||||||
$ipport = '[' . $domain['ip'] . ']:' . $domain['port'];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$ipport = $domain['ip'] . ':' . $domain['port'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$vhost_content.= $this->getServerNames($domain) . " {\n";
|
|
||||||
$vhost_content.= $this->getWebroot($domain, $ssl_vhost);
|
|
||||||
$vhost_content.= $this->create_htaccess($domain);
|
|
||||||
$vhost_content.= $this->create_pathOptions($domain);
|
|
||||||
$vhost_content.= $this->create_Fcgid($domain);
|
|
||||||
$vhost_content.= $this->getLogFiles($domain);
|
|
||||||
$vhost_content.= '}' . "\n";
|
|
||||||
return $vhost_content;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getLogFiles($domain)
|
|
||||||
{
|
|
||||||
$logfiles_text = '';
|
|
||||||
|
|
||||||
if($this->settings['system']['mod_log_sql'] == 1)
|
|
||||||
{
|
|
||||||
// We are using mod_log_sql (http://www.outoforder.cc/projects/apache/mod_log_sql/)
|
|
||||||
// TODO: See how we are able emulate the error_log
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// The normal access/error - logging is enabled
|
|
||||||
|
|
||||||
$filename = $this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-error.log';
|
|
||||||
|
|
||||||
if(!is_file($filename))
|
|
||||||
{
|
|
||||||
$ourFileHandle = fopen($filename, 'w') or die("can't open file");
|
|
||||||
fclose($ourFileHandle);
|
|
||||||
}
|
|
||||||
|
|
||||||
chown($filename, $this->settings[system]['httpuser']);
|
|
||||||
chgrp($filename, $this->settings[system]['httpgroup']);
|
|
||||||
|
|
||||||
//access log
|
|
||||||
|
|
||||||
$filename = $this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-access.log';
|
|
||||||
|
|
||||||
if(!is_file($filename))
|
|
||||||
{
|
|
||||||
$ourFileHandle = fopen($filename, 'w') or die("can't open file");
|
|
||||||
fclose($ourFileHandle);
|
|
||||||
}
|
|
||||||
|
|
||||||
$logfiles_text.= ' accesslog.filename = "' . $filename . '"' . "\n";
|
|
||||||
chown($filename, $this->settings[system]['httpuser']);
|
|
||||||
chgrp($filename, $this->settings[system]['httpgroup']);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $logfiles_text;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function create_Fcgid($domain)
|
|
||||||
{
|
{
|
||||||
$php_options_text = '';
|
$php_options_text = '';
|
||||||
|
|
||||||
@@ -502,300 +251,35 @@ class lighttpd_fcgid extends lighttpd
|
|||||||
return $php_options_text;
|
return $php_options_text;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function create_pathOptions($domain)
|
private function getPhpConfig($php_config_id)
|
||||||
{
|
{
|
||||||
$query = "SELECT * FROM " . TABLE_PANEL_HTACCESS . " WHERE `path` LIKE '" . $domain['documentroot'] . "%'";
|
$php_config_id = intval($php_config_id);
|
||||||
$result = $this->db->query($query);
|
|
||||||
|
|
||||||
$path_options = '';
|
// If domain has no config, we will use the default one.
|
||||||
$error_string = '';
|
|
||||||
|
|
||||||
while($row = $this->db->fetch_array($result))
|
if($php_config_id == 0)
|
||||||
{
|
{
|
||||||
if(!empty($row['error404path']))
|
$php_config_id = 1;
|
||||||
{
|
|
||||||
$error_string.= ' server.error-handler-404 = "' . makeCorrectFile($row['documentroot'] . '/' . $row['error404path']) . '"' . "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
if($row['options_indexes'] != '0')
|
|
||||||
{
|
|
||||||
$path = makeCorrectDir(substr($row['path'], strlen($domain['documentroot']) - 1));
|
|
||||||
|
|
||||||
// We need to remove the last slash, otherwise the regex wouldn't work
|
|
||||||
|
|
||||||
$path = substr($path, 0, -1);
|
|
||||||
$path_options.= '$HTTP["url"] =~ "^' . $path . '($|/)" {' . "\n";
|
|
||||||
$path_options.= "\t" . 'dir-listing.activate = "enable"' . "\n";
|
|
||||||
if(!empty($error_string))
|
|
||||||
{
|
|
||||||
$path_options.= $error_string;
|
|
||||||
// reset $error_string here to prevent duplicate entries
|
|
||||||
$error_string = '';
|
|
||||||
}
|
|
||||||
$path_options.= '}' . "\n";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$path_options = $error_string;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $path_options;
|
if(!isset($this->php_configs_cache[$php_config_id]))
|
||||||
|
{
|
||||||
|
$this->php_configs_cache[$php_config_id] = $this->db->query_first("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = " . (int)$php_config_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->php_configs_cache[$php_config_id];
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getDirOptions($domain)
|
private function getAdminData($adminid)
|
||||||
{
|
{
|
||||||
$query = "SELECT * FROM " . TABLE_PANEL_HTPASSWDS . " WHERE `customerid`='" . $domain[customerid] . "'";
|
$adminid = intval($adminid);
|
||||||
$result = $this->db->query($query);
|
|
||||||
|
|
||||||
while($row_htpasswds = $this->db->fetch_array($result))
|
if(!isset($this->admin_cache[$adminid]))
|
||||||
{
|
{
|
||||||
if($auth_backend_loaded[$domain['ipandport']] != 'yes'
|
$this->admin_cache[$adminid] = $this->db->query_first("SELECT `email`, `loginname` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid` = " . (int)$adminid);
|
||||||
&& $auth_backend_loaded[$domain['ssl_ipandport']] != 'yes')
|
|
||||||
{
|
|
||||||
$filename = $domain['customerid'] . '.htpasswd';
|
|
||||||
|
|
||||||
if($this->auth_backend_loaded[$domain['ipandport']] != 'yes')
|
|
||||||
{
|
|
||||||
$auth_backend_loaded[$domain['ipandport']] = 'yes';
|
|
||||||
$diroption_text.= 'auth.backend = "htpasswd"' . "\n";
|
|
||||||
$diroption_text.= 'auth.backend.htpasswd.userfile = "' . makeCorrectFile($this->settings['system']['apacheconf_htpasswddir'] . '/' . $filename) . '"' . "\n";
|
|
||||||
$this->needed_htpasswds[$filename] = $row_htpasswds['username'] . ':' . $row_htpasswds['password'] . "\n";
|
|
||||||
$diroption_text.= 'auth.require = ( ' . "\n";
|
|
||||||
$previous_domain_id = '1';
|
|
||||||
}
|
|
||||||
elseif($this->auth_backend_loaded[$domain['ssl_ipandport']] != 'yes')
|
|
||||||
{
|
|
||||||
$auth_backend_loaded[$domain['ssl_ipandport']] = 'yes';
|
|
||||||
$diroption_text.= 'auth.backend= "htpasswd"' . "\n";
|
|
||||||
$diroption_text.= 'auth.backend.htpasswd.userfile = "' . makeCorrectFile($this->settings['system']['apacheconf_htpasswddir'] . '/' . $filename) . '"' . "\n";
|
|
||||||
$this->needed_htpasswds[$filename] = $row_htpasswds['username'] . ':' . $row_htpasswds['password'] . "\n";
|
|
||||||
$diroption_text.= 'auth.require = ( ' . "\n";
|
|
||||||
$previous_domain_id = '1';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$diroption_text.= '"' . $row_htpasswds['path'] . '" =>' . "\n";
|
|
||||||
$diroption_text.= '(' . "\n";
|
|
||||||
$diroption_text.= ' "method" => "basic",' . "\n";
|
|
||||||
$diroption_text.= ' "realm" => "Restricted Area",' . "\n";
|
|
||||||
$diroption_text.= ' "require" => "user=' . $row_htpasswds['username'] . '"' . "\n";
|
|
||||||
$diroption_text.= ')' . "\n";
|
|
||||||
|
|
||||||
if($this->auth_backend_loaded[$domain['ssl_ipandport']] == 'yes')
|
|
||||||
{
|
|
||||||
$this->needed_htpasswds[$domain['ssl_ipandport']].= $diroption_text;
|
|
||||||
}
|
|
||||||
|
|
||||||
if($this->auth_backend_loaded[$domain['ipandport']] != 'yes')
|
|
||||||
{
|
|
||||||
$this->needed_htpasswds[$domain['ipandport']].= $diroption_text;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ' auth.backend.htpasswd.userfile = "' . makeCorrectFile($this->settings['system']['apacheconf_htpasswddir'] . '/' . $filename) . '"' . "\n";
|
return $this->admin_cache[$adminid];
|
||||||
}
|
|
||||||
|
|
||||||
protected function getServerNames($domain)
|
|
||||||
{
|
|
||||||
$server_string = array();
|
|
||||||
$domain_name = ereg_replace('\.', '\.', $domain['domain']);
|
|
||||||
|
|
||||||
if($domain['iswildcarddomain'] == '1')
|
|
||||||
{
|
|
||||||
$server_string[] = '(^|\.)' . $domain_name . '$';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if($domain['wwwserveralias'] == '1')
|
|
||||||
{
|
|
||||||
$server_string[] = '^(www\.|)' . $domain_name . '$';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$alias_domains = $this->db->query('SELECT `domain`, `iswildcarddomain`, `wwwserveralias` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `aliasdomain`=\'' . $domain['id'] . '\'');
|
|
||||||
|
|
||||||
while(($alias_domain = $this->db->fetch_array($alias_domains)) !== false)
|
|
||||||
{
|
|
||||||
$alias_domain_name = ereg_replace('\.', '\.', $alias_domain['domain']);
|
|
||||||
|
|
||||||
if($alias_domain['iswildcarddomain'] == '1')
|
|
||||||
{
|
|
||||||
$server_string[] = '(^|\.)' . $alias_domain_name . '$';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if($alias_domain['wwwserveralias'] == '1')
|
|
||||||
{
|
|
||||||
$server_string[] = '^(www.)?' . $alias_domain_name;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$server_string[] = $alias_domain_name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for ($i = 0;$i < sizeof($server_string);$i++)
|
|
||||||
{
|
|
||||||
$data = $server_string[$i];
|
|
||||||
|
|
||||||
if(sizeof($server_string) > 1)
|
|
||||||
{
|
|
||||||
if($i == 0)
|
|
||||||
{
|
|
||||||
$servernames_text = '(' . $data . '|';
|
|
||||||
}
|
|
||||||
elseif(sizeof($server_string) - 1 == $i)
|
|
||||||
{
|
|
||||||
$servernames_text.= $data . ')';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$servernames_text.= $data . '|';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$servernames_text = $data;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
unset($data);
|
|
||||||
$servernames_text = '$HTTP["host"] =~ "' . $servernames_text . '"';
|
|
||||||
return $servernames_text;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getWebroot($domain, $ssl)
|
|
||||||
{
|
|
||||||
$webroot_text = '';
|
|
||||||
|
|
||||||
if($domain['deactivated'] == '1'
|
|
||||||
&& $this->settings['system']['deactivateddocroot'] != '')
|
|
||||||
{
|
|
||||||
$webroot_text.= ' # Using docroot for deactivated users...' . "\n";
|
|
||||||
$webroot_text.= ' server.document-root = "' . $this->settings['system']['deactivateddocroot'] . "\"\n";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if($ssl === false
|
|
||||||
&& $domain['ssl_redirect'] == '1')
|
|
||||||
{
|
|
||||||
$webroot_text.= ' url.redirect = ( "^/(.*)" => "https://' . $domain['domain'] . '/$1" )' . "\n";
|
|
||||||
}
|
|
||||||
elseif(preg_match("#^https?://#i", $domain['documentroot']))
|
|
||||||
{
|
|
||||||
$webroot_text.= ' url.redirect = ( "^/(.*)" => "' . $domain['documentroot'] . '/$1" )' . "\n";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$webroot_text.= ' server.document-root = "' . makeCorrectDir($domain['documentroot']) . "\"\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $webroot_text;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function writeConfigs()
|
|
||||||
{
|
|
||||||
fwrite($this->debugHandler, ' lighttpd::writeConfigs: rebuilding ' . $this->settings['system']['apacheconf_vhost'] . "\n");
|
|
||||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, "rebuilding " . $this->settings['system']['apacheconf_vhost']);
|
|
||||||
|
|
||||||
if(!isConfigDir($this->settings['system']['apacheconf_vhost']))
|
|
||||||
{
|
|
||||||
// Save one big file
|
|
||||||
|
|
||||||
foreach($this->lighttpd_data as $vhosts_filename => $vhost_content)
|
|
||||||
{
|
|
||||||
$vhosts_file.= $vhost_content . "\n\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
$vhosts_filename = $this->settings['system']['apacheconf_vhost'];
|
|
||||||
|
|
||||||
// Apply header
|
|
||||||
|
|
||||||
$vhosts_file = '# ' . basename($vhosts_filename) . "\n" . '# Created ' . date('d.m.Y H:i') . "\n" . '# Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.' . "\n" . "\n" . $vhosts_file;
|
|
||||||
$vhosts_file_handler = fopen($vhosts_filename, 'w');
|
|
||||||
fwrite($vhosts_file_handler, $vhosts_file);
|
|
||||||
fclose($vhosts_file_handler);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if(!file_exists($this->settings['system']['apacheconf_vhost']))
|
|
||||||
{
|
|
||||||
fwrite($this->debugHandler, ' lighttpd::writeConfigs: mkdir ' . escapeshellarg(makeCorrectDir($this->settings['system']['apacheconf_vhost'])) . "\n");
|
|
||||||
$this->logger->logAction(CRON_ACTION, LOG_NOTICE, 'mkdir ' . escapeshellarg(makeCorrectDir($this->settings['system']['apacheconf_vhost'])));
|
|
||||||
safe_exec('mkdir ' . escapeshellarg(makeCorrectDir($this->settings['system']['apacheconf_vhost'])));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Write a single file for every vhost
|
|
||||||
|
|
||||||
foreach($this->lighttpd_data as $vhosts_filename => $vhosts_file)
|
|
||||||
{
|
|
||||||
$this->known_filenames[] = basename($vhosts_filename);
|
|
||||||
|
|
||||||
// Apply header
|
|
||||||
|
|
||||||
$vhosts_file = '# ' . basename($vhosts_filename) . "\n" . '# Created ' . date('d.m.Y H:i') . "\n" . '# Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.' . "\n" . "\n" . $vhosts_file;
|
|
||||||
|
|
||||||
if(!empty($vhosts_filename))
|
|
||||||
{
|
|
||||||
$vhosts_file_handler = fopen($vhosts_filename, 'w');
|
|
||||||
fwrite($vhosts_file_handler, $vhosts_file);
|
|
||||||
fclose($vhosts_file_handler);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->wipeOutOldConfigs();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Write the diroptions
|
|
||||||
|
|
||||||
if(isConfigDir($this->settings['system']['apacheconf_htpasswddir']))
|
|
||||||
{
|
|
||||||
foreach($this->needed_htpasswds as $key => $data)
|
|
||||||
{
|
|
||||||
if(!is_dir($this->settings['system']['apacheconf_htpasswddir']))
|
|
||||||
{
|
|
||||||
mkdir($this->settings['system']['apacheconf_htpasswddir']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$filename = $this->settings['system']['apacheconf_htpasswddir'] . '/' . $key;
|
|
||||||
$htpasswd_handler = fopen($filename, 'w');
|
|
||||||
fwrite($htpasswd_handler, $data);
|
|
||||||
fclose($htpasswd_handler);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private function wipeOutOldConfigs()
|
|
||||||
{
|
|
||||||
fwrite($this->debugHandler, ' apache::wipeOutOldConfigs: cleaning ' . $this->settings['system']['apacheconf_vhost'] . "\n");
|
|
||||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, "cleaning " . $this->settings['system']['apacheconf_vhost']);
|
|
||||||
|
|
||||||
if(isConfigDir($this->settings['system']['apacheconf_vhost'])
|
|
||||||
&& file_exists($this->settings['system']['apacheconf_vhost'])
|
|
||||||
&& is_dir($this->settings['system']['apacheconf_vhost']))
|
|
||||||
{
|
|
||||||
$vhost_file_dirhandle = opendir($this->settings['system']['apacheconf_vhost']);
|
|
||||||
|
|
||||||
while(false !== ($vhost_filename = readdir($vhost_file_dirhandle)))
|
|
||||||
{
|
|
||||||
if($vhost_filename != '.'
|
|
||||||
&& $vhost_filename != '..'
|
|
||||||
&& !in_array($vhost_filename, $this->known_filenames)
|
|
||||||
&& preg_match('/^(10|20|30)_syscp_ipandport_(.+)\.conf$/', $vhost_filename)
|
|
||||||
&& file_exists(makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/' . $vhost_filename)))
|
|
||||||
{
|
|
||||||
fwrite($this->debugHandler, ' apache::wipeOutOldConfigs: unlinking ' . $vhost_filename . "\n");
|
|
||||||
$this->logger->logAction(CRON_ACTION, LOG_NOTICE, 'unlinking ' . $vhost_filename);
|
|
||||||
unlink(makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/' . $vhost_filename));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,28 +53,47 @@ while($row = $db->fetch_array($result_tasks))
|
|||||||
|
|
||||||
if($row['type'] == '1')
|
if($row['type'] == '1')
|
||||||
{
|
{
|
||||||
|
//dhr: cleanout froxlor-generated awstats configs prior to re-creation
|
||||||
|
if ($settings[system][awstats_enabled] == '1')
|
||||||
|
{
|
||||||
|
$awstatsclean[header] = "## GENERATED BY FROXLOR\n";
|
||||||
|
$awstatsclean[path] = '/etc/awstats';
|
||||||
|
$awstatsclean[dir] = dir($awstatsclean[path]);
|
||||||
|
while($awstatsclean[entry] = $awstatsclean[dir]->read()) {
|
||||||
|
$awstatsclean[fullentry] = $awstatsclean[path].'/'.$awstatsclean[entry];
|
||||||
|
$awstatsclean[fh] = fopen($awstatsclean[fullentry], 'r');
|
||||||
|
$awstatsclean[headerRead] = fgets($awstatsclean[fh], strlen($awstatsclean[header])+1);
|
||||||
|
fclose($awstatsclean[fh]);
|
||||||
|
if($awstatsclean[headerRead] == $awstatsclean[header]) {
|
||||||
|
@unlink($awstatsclean[fullentry]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
unset($awstatsclean);
|
||||||
|
}
|
||||||
|
//end dhr
|
||||||
|
|
||||||
if(!isset($webserver))
|
if(!isset($webserver))
|
||||||
{
|
{
|
||||||
if($settings['system']['webserver'] == "apache2")
|
if($settings['system']['webserver'] == "apache2")
|
||||||
{
|
{
|
||||||
if($settings['system']['mod_fcgid'] == 1)
|
if($settings['system']['mod_fcgid'] == 1)
|
||||||
{
|
{
|
||||||
$webserver = new apache_fcgid($db, $cronlog, $debugHandler, $settings);
|
$webserver = new apache_fcgid($db, $cronlog, $debugHandler, $idna_convert, $settings);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$webserver = new apache($db, $cronlog, $debugHandler, $settings);
|
$webserver = new apache($db, $cronlog, $debugHandler, $idna_convert, $settings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif($settings['system']['webserver'] == "lighttpd")
|
elseif($settings['system']['webserver'] == "lighttpd")
|
||||||
{
|
{
|
||||||
if($settings['system']['mod_fcgid'] == 1)
|
if($settings['system']['mod_fcgid'] == 1)
|
||||||
{
|
{
|
||||||
$webserver = new lighttpd_fcgid($db, $cronlog, $debugHandler, $settings);
|
$webserver = new lighttpd_fcgid($db, $cronlog, $debugHandler, $idna_convert, $settings);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$webserver = new lighttpd($db, $cronlog, $debugHandler, $settings);
|
$webserver = new lighttpd($db, $cronlog, $debugHandler, $idna_convert, $settings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ $header
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_name">{$lng['customer']['traffic']}: *</td>
|
<td class="main_field_name">{$lng['customer']['traffic']}: *</td>
|
||||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="traffic" value="0" maxlength="3" /> {$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>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_name">{$lng['customer']['subdomains']}: *</td>
|
<td class="main_field_name">{$lng['customer']['subdomains']}: *</td>
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ $header
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_name">{$lng['customer']['traffic']}: *</td>
|
<td class="main_field_name">{$lng['customer']['traffic']}: *</td>
|
||||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="traffic" value="{$result['traffic']}" maxlength="3" /> {$traffic_ul}</td>
|
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="traffic" value="{$result['traffic']}" maxlength="4" /> {$traffic_ul}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_name">{$lng['customer']['subdomains']}: *</td>
|
<td class="main_field_name">{$lng['customer']['subdomains']}: *</td>
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ $header
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_name">{$lng['customer']['traffic']}: *</td>
|
<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="3" /> {$traffic_ul}</td>
|
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="traffic" value="" maxlength="4" /> {$traffic_ul}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_name">{$lng['customer']['subdomains']}: *</td>
|
<td class="main_field_name">{$lng['customer']['subdomains']}: *</td>
|
||||||
|
|||||||
@@ -12,6 +12,6 @@
|
|||||||
<td class="field_name"><b><font color="green">{$row['mysqls_used']}</font></b>/<b><font color="#FD6204">{$row['mysqls']}</font></b><br /><b><font color="green">{$row['ftps_used']}</font></b>/<b><font color="#FD6204">{$row['ftps']}</font></b></td>
|
<td class="field_name"><b><font color="green">{$row['mysqls_used']}</font></b>/<b><font color="#FD6204">{$row['mysqls']}</font></b><br /><b><font color="green">{$row['ftps_used']}</font></b>/<b><font color="#FD6204">{$row['ftps']}</font></b></td>
|
||||||
<td class="field_name"><b><font color="green">{$row['emails_used']}</font></b>/<b><font color="#FD6204">{$row['emails']}</font></b><br /><b><font color="green">{$row['subdomains_used']}</font></b>/<b><font color="#FD6204">{$row['subdomains']}</font></b></td>
|
<td class="field_name"><b><font color="green">{$row['emails_used']}</font></b>/<b><font color="#FD6204">{$row['emails']}</font></b><br /><b><font color="green">{$row['subdomains_used']}</font></b>/<b><font color="#FD6204">{$row['subdomains']}</font></b></td>
|
||||||
<td class="field_name"><b><font color="green">{$row['email_accounts_used']}</font></b>/<b><font color="#FD6204">{$row['email_accounts']}</font></b><br /><b><font color="green">{$row['email_forwarders_used']}</font></b>/<b><font color="#FD6204">{$row['email_forwarders']}</font></b></td>
|
<td class="field_name"><b><font color="green">{$row['email_accounts_used']}</font></b>/<b><font color="#FD6204">{$row['email_accounts']}</font></b><br /><b><font color="green">{$row['email_forwarders_used']}</font></b>/<b><font color="#FD6204">{$row['email_forwarders']}</font></b></td>
|
||||||
<td class="field_name" style=" text-align: center; "><if $row['deactivated'] == '1'>{$lng['panel']['yes']}<else>{$lng['panel']['no']}</if><br /><if $row['service_active'] == '1'>{$lng['panel']['yes']}<else>{$lng['panel']['no']}</if></td>
|
<td class="field_name" style=" text-align: center; "><if $row['deactivated'] == '1'>{$lng['panel']['yes']}<else>{$lng['panel']['no']}</if></td>
|
||||||
<td class="field_name"><a href="$filename?s=$s&page=$page&action=edit&id={$row['customerid']}">{$lng['panel']['edit']}</a> <if $enable_billing_data_edit === true><a href="$filename?s=$s&page=$page&action=delete&id={$row['customerid']}">{$lng['panel']['delete']}</a></if><if $settings['billing']['activate_billing']><br /><a href="$filename?s=$s&page=$page&action=pdf&id={$row['customerid']}" target="_blank">{$lng['customer']['create_contract']}</a></if></td>
|
<td class="field_name"><a href="$filename?s=$s&page=$page&action=edit&id={$row['customerid']}">{$lng['panel']['edit']}</a><br /><a href="$filename?s=$s&page=$page&action=delete&id={$row['customerid']}">{$lng['panel']['delete']}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ $header
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_name">{$lng['customer']['traffic']}: *</td>
|
<td class="main_field_name">{$lng['customer']['traffic']}: *</td>
|
||||||
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="traffic" value="{$result['traffic']}" maxlength="3" /> {$traffic_ul}</td>
|
<td class="main_field_display" nowrap="nowrap"><input type="text" class="textul" name="traffic" value="{$result['traffic']}" maxlength="4" /> {$traffic_ul}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="main_field_name">{$lng['customer']['subdomains']}: *</td>
|
<td class="main_field_name">{$lng['customer']['subdomains']}: *</td>
|
||||||
|
|||||||
@@ -142,12 +142,6 @@ $header
|
|||||||
<td class="field_name_border_left" colspan="2">$lookfornewversion_addinfo</td>
|
<td class="field_name_border_left" colspan="2">$lookfornewversion_addinfo</td>
|
||||||
</tr>
|
</tr>
|
||||||
</if>
|
</if>
|
||||||
<tr>
|
|
||||||
<td colspan="2" class="maintitle"><b><img src="images/title.gif" alt="" /> {$lng['admin']['thankyou']}</b></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="field_name_border_left" colspan="2"><b>{$lng['admin']['contributors']}:</b><br />Florian Lippert, Tim Zielosko, Martin Burchert, Ron Brand, Michael Duergner, Wolfgang Ziegler, Patrick Brueckner, Florian Aders, Luca Longinotti, Manuel Bernhardt, Janky Jay, Thomas Peterhans, Benjamin Börngen-Schmidt, Philipp Haefelfinger, Michael Kaufmannk, Sven Skrabal</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
{$version}
|
{$version}
|
||||||
</if>
|
</if>
|
||||||
© 2009-2010 by <a href="http://www.froxlor.org/" target="_blank">the Froxlor Team</a>
|
© 2009-2010 by <a href="http://www.froxlor.org/" target="_blank">the Froxlor Team</a>
|
||||||
<br />Theme: Luca Piona and Luca Longinotti
|
<br />Theme based on work by: Luca Piona and Luca Longinotti
|
||||||
<if $lng['translator'] != ''>
|
<if $lng['translator'] != ''>
|
||||||
<br />{$lng['panel']['translator']}: {$lng['translator']}
|
<br />{$lng['panel']['translator']}: {$lng['translator']}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<meta name="GOOGLEBOT" content="nosnippet" />
|
<meta name="GOOGLEBOT" content="nosnippet" />
|
||||||
</if>
|
</if>
|
||||||
<link rel="stylesheet" href="templates/main.css" type="text/css" />
|
<link rel="stylesheet" href="templates/main.css" type="text/css" />
|
||||||
<title><if isset($userinfo['loginname']) && $userinfo['loginname'] != ''>{$userinfo['loginname']} - </if>SysCP</title>
|
<title><if isset($userinfo['loginname']) && $userinfo['loginname'] != ''>{$userinfo['loginname']} - </if>Froxlor</title>
|
||||||
</head>
|
</head>
|
||||||
<body style="margin: 0; padding: 0;"<if !isset($userinfo['loginname']) && !(isset($userinfo['loginname']) && $userinfo['loginname'] == '')> onload="document.loginform.loginname.focus()"</if>>
|
<body style="margin: 0; padding: 0;"<if !isset($userinfo['loginname']) && !(isset($userinfo['loginname']) && $userinfo['loginname'] == '')> onload="document.loginform.loginname.focus()"</if>>
|
||||||
<!--
|
<!--
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ $header
|
|||||||
<if $settings['panel']['allow_preset'] == '1'>
|
<if $settings['panel']['allow_preset'] == '1'>
|
||||||
<table cellpadding="5" cellspacing="0" border="0" align="center" class="maintable">
|
<table cellpadding="5" cellspacing="0" border="0" align="center" class="maintable">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="maintitle" colspan="3"><b><img src="images/title.gif" alt="" /> SysCP - {$lng['login']['presend']}</b></td>
|
<td class="maintitle" colspan="3"><b><img src="images/title.gif" alt="" /> Froxlor - {$lng['login']['presend']}</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td rowspan="2" class="field_name_center"><img src="images/login.gif" alt="" /></td>
|
<td rowspan="2" class="field_name_center"><img src="images/login.gif" alt="" /></td>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ $header
|
|||||||
</if>
|
</if>
|
||||||
<table cellpadding="5" cellspacing="0" border="0" align="center" class="maintable">
|
<table cellpadding="5" cellspacing="0" border="0" align="center" class="maintable">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="maintitle" colspan="3"><b><img src="images/title.gif" alt="" /> SysCP - Login</b></td>
|
<td class="maintitle" colspan="3"><b><img src="images/title.gif" alt="" /> Froxlor - Login</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td rowspan="3" class="field_name_center"><img src="images/login.gif" alt="" /></td>
|
<td rowspan="3" class="field_name_center"><img src="images/login.gif" alt="" /></td>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
# Set PATH, otherwise restart-scripts won't find start-stop-daemon
|
# Set PATH, otherwise restart-scripts won't find start-stop-daemon
|
||||||
#
|
#
|
||||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
|
|
||||||
*/10 * * * * www-data [ -x /usr/bin/awstats_updateall.pl ] && /usr/bin/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl -configdir=/etc/awstats -excludeconf=awstats.model.conf.syscp,awstats.conf
|
*/10 * * * * www-data [ -x /usr/bin/awstats_updateall.pl ] && /usr/bin/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl -configdir=/etc/awstats -excludeconf=awstats.model.conf.froxlor,awstats.conf
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
# Set PATH, otherwise restart-scripts won't find start-stop-daemon
|
# Set PATH, otherwise restart-scripts won't find start-stop-daemon
|
||||||
#
|
#
|
||||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
|
|
||||||
45 0 * * * www-data [ -x /usr/bin/awstats_updateall.pl ] && /usr/bin/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl -configdir=/etc/awstats -excludeconf=awstats.model.conf.syscp,awstats.conf
|
45 0 * * * www-data [ -x /usr/bin/awstats_updateall.pl ] && /usr/bin/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl -configdir=/etc/awstats -excludeconf=awstats.model.conf.froxlor,awstats.conf
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
#
|
||||||
|
# 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/cron_tasks.php
|
||||||
|
0 0 * * * root /usr/bin/php5 -q /var/www/froxlor/scripts/cron_traffic.php
|
||||||
|
30 0 * * * root /usr/bin/php5 -q /var/www/froxlor/scripts/cron_ticketarchive.php
|
||||||
|
0 1 * * * root /usr/bin/php5 -q /var/www/froxlor/scripts/cron_used_tickets_reset.php
|
||||||
|
*/5 * * * * root /usr/bin/php5 -q /var/www/froxlor/scripts/cron_autoresponder.php
|
||||||
|
*/5 * * * * root /usr/bin/php5 -q /var/www/froxlor/scripts/cron_apsinstaller.php
|
||||||
|
*/30 * * * * root /usr/bin/php5 -q /var/www/froxlor/scripts/cron_apsupdater.php
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
#
|
|
||||||
# Set PATH, otherwise restart-scripts won't find start-stop-daemon
|
|
||||||
#
|
|
||||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
|
||||||
#
|
|
||||||
# Regular cron jobs for the syscp package
|
|
||||||
#
|
|
||||||
*/5 * * * * root /usr/bin/php5 -q /var/www/syscp/scripts/cron_tasks.php
|
|
||||||
0 0 * * * root /usr/bin/php5 -q /var/www/syscp/scripts/cron_traffic.php
|
|
||||||
30 0 * * * root /usr/bin/php5 -q /var/www/syscp/scripts/cron_ticketarchive.php
|
|
||||||
0 1 * * * root /usr/bin/php5 -q /var/www/syscp/scripts/cron_used_tickets_reset.php
|
|
||||||
*/5 * * * * root /usr/bin/php5 -q /var/www/syscp/scripts/cron_autoresponder.php
|
|
||||||
*/5 * * * * root /usr/bin/php5 -q /var/www/syscp/scripts/cron_apsinstaller.php
|
|
||||||
*/30 * * * * root /usr/bin/php5 -q /var/www/syscp/scripts/cron_apsupdater.php
|
|
||||||
@@ -11,7 +11,7 @@ acl_check_rcpt:
|
|||||||
|
|
||||||
.ifdef CHECK_RCPT_LOCAL_LOCALPARTS
|
.ifdef CHECK_RCPT_LOCAL_LOCALPARTS
|
||||||
deny
|
deny
|
||||||
domains = +local_domains:+syscp_domain
|
domains = +local_domains:+froxlor_domain
|
||||||
local_parts = CHECK_RCPT_LOCAL_LOCALPARTS
|
local_parts = CHECK_RCPT_LOCAL_LOCALPARTS
|
||||||
message = restricted characters in address
|
message = restricted characters in address
|
||||||
.endif
|
.endif
|
||||||
@@ -29,7 +29,7 @@ acl_check_rcpt:
|
|||||||
.else
|
.else
|
||||||
local_parts = CHECK_RCPT_POSTMASTER
|
local_parts = CHECK_RCPT_POSTMASTER
|
||||||
.endif
|
.endif
|
||||||
domains = +local_domains:+syscp_domain
|
domains = +local_domains:+froxlor_domain
|
||||||
|
|
||||||
deny
|
deny
|
||||||
message = sender envelope address $sender_address is locally blacklisted here. If you think this is wrong, get in touch with postmaster
|
message = sender envelope address $sender_address is locally blacklisted here. If you think this is wrong, get in touch with postmaster
|
||||||
@@ -95,7 +95,7 @@ acl_check_rcpt:
|
|||||||
.endif
|
.endif
|
||||||
|
|
||||||
accept
|
accept
|
||||||
domains = +local_domains:+syscp_domain
|
domains = +local_domains:+froxlor_domain
|
||||||
endpass
|
endpass
|
||||||
message = unknown user
|
message = unknown user
|
||||||
verify = recipient
|
verify = recipient
|
||||||
|
|||||||
@@ -1,30 +1,30 @@
|
|||||||
### auth/30_syscp-config
|
### auth/30_froxlor-config
|
||||||
#################################
|
#################################
|
||||||
|
|
||||||
plain_server:
|
plain_server:
|
||||||
driver = plaintext
|
driver = plaintext
|
||||||
public_name = PLAIN
|
public_name = PLAIN
|
||||||
server_condition = "${if and { \
|
server_condition = "${if and { \
|
||||||
{!eq{$2}{}} \
|
{!eq{$2}{}} \
|
||||||
{!eq{$3}{}} \
|
{!eq{$3}{}} \
|
||||||
{crypteq{$3}{${lookup mysql{SYSCP_AUTH_PLAIN}{$value}fail}}} \
|
{crypteq{$3}{${lookup mysql{FROXLOR_AUTH_PLAIN}{$value}fail}}} \
|
||||||
} {yes}{no}}"
|
} {yes}{no}}"
|
||||||
server_set_id = $2
|
server_set_id = $2
|
||||||
server_prompts = :
|
server_prompts = :
|
||||||
# .ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS
|
# .ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS
|
||||||
# server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}}
|
# server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}}
|
||||||
# .endif
|
# .endif
|
||||||
|
|
||||||
login_server:
|
login_server:
|
||||||
driver = plaintext
|
driver = plaintext
|
||||||
public_name = LOGIN
|
public_name = LOGIN
|
||||||
server_prompts = "Username:: : Password::"
|
server_prompts = "Username:: : Password::"
|
||||||
server_condition = "${if and { \
|
server_condition = "${if and { \
|
||||||
{!eq{$1}{}} \
|
{!eq{$1}{}} \
|
||||||
{!eq{$2}{}} \
|
{!eq{$2}{}} \
|
||||||
{crypteq{$2}{${lookup mysql{SYSCP_AUTH_LOGIN}{$value}fail}}} \
|
{crypteq{$2}{${lookup mysql{FROXLOR_AUTH_LOGIN}{$value}fail}}} \
|
||||||
} {yes}{no}}"
|
} {yes}{no}}"
|
||||||
server_set_id = $1
|
server_set_id = $1
|
||||||
# .ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS
|
# .ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS
|
||||||
# server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}}
|
# server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}}
|
||||||
# .endif
|
# .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
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
hide mysql_servers = <SQL_HOST>/<SQL_DB>/<SQL_UNPRIVILEGED_USER>/<SQL_UNPRIVILEGED_PASSWORD>
|
|
||||||
|
|
||||||
SYSCP_LOCAL_DOMAIN = SELECT domain FROM panel_domains WHERE domain = '${quote_mysql:$domain}' AND isemaildomain = '1'
|
|
||||||
|
|
||||||
SYSCP_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
|
|
||||||
|
|
||||||
SYSCP_MAILUSER = SELECT CONCAT(homedir,maildir) FROM mail_users WHERE \
|
|
||||||
email = '${quote_mysql:$local_part}@${quote_mysql:$domain}' AND postfix = 'y'
|
|
||||||
|
|
||||||
SYSCP_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
|
|
||||||
|
|
||||||
SYSCP_AUTH_PLAIN = SELECT password_enc FROM mail_users WHERE username = '${quote_mysql:$2}'
|
|
||||||
|
|
||||||
SYSCP_AUTH_LOGIN = SELECT password_enc FROM mail_users WHERE username = '${quote_mysql:$1}'
|
|
||||||
|
|
||||||
domainlist syscp_domain = mysql;SYSCP_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
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
syscp_mailalias:
|
|
||||||
debug_print = "R: syscp_mailalias for $local_part@$domain"
|
|
||||||
driver = redirect
|
|
||||||
domains = +syscp_domain
|
|
||||||
data = ${lookup mysql {SYSCP_MAILALIAS}{$value}fail}
|
|
||||||
|
|
||||||
syscp_mailuser:
|
|
||||||
debug_print = "R: syscp_mailuser for $local_part@$domain"
|
|
||||||
driver = redirect
|
|
||||||
domains = +syscp_domain
|
|
||||||
data = ${lookup mysql {SYSCP_MAILUSER}{$value}fail}
|
|
||||||
directory_transport = maildir_syscp
|
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
maildir_syscp:
|
maildir_froxlor:
|
||||||
debug_print = "T: maildir_syscp for $local_part@$domain"
|
debug_print = "T: maildir_froxlor for $local_part@$domain"
|
||||||
driver = appendfile
|
driver = appendfile
|
||||||
create_directory
|
create_directory
|
||||||
delivery_date_add
|
delivery_date_add
|
||||||
envelope_to_add
|
envelope_to_add
|
||||||
return_path_add
|
return_path_add
|
||||||
maildir_format
|
maildir_format
|
||||||
directory_mode = 0770
|
directory_mode = 0770
|
||||||
mode = 0660
|
mode = 0660
|
||||||
mode_fail_narrower = false
|
mode_fail_narrower = false
|
||||||
user = 2000
|
user = 2000
|
||||||
group = 2000
|
group = 2000
|
||||||
@@ -1,60 +1,60 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# Default lighttpd.conf for SysCP.
|
# Default lighttpd.conf for Froxlor.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
var.basedir = "/var/www"
|
var.basedir = "/var/www"
|
||||||
var.logdir = "/var/log/lighttpd"
|
var.logdir = "/var/log/lighttpd"
|
||||||
var.statedir = "/var/lib/lighttpd"
|
var.statedir = "/var/lib/lighttpd"
|
||||||
|
|
||||||
server.modules = (
|
server.modules = (
|
||||||
"mod_rewrite",
|
"mod_rewrite",
|
||||||
"mod_redirect",
|
"mod_redirect",
|
||||||
"mod_alias",
|
"mod_alias",
|
||||||
"mod_access",
|
"mod_access",
|
||||||
"mod_auth",
|
"mod_auth",
|
||||||
"mod_fastcgi",
|
"mod_fastcgi",
|
||||||
"mod_accesslog"
|
"mod_accesslog"
|
||||||
)
|
)
|
||||||
|
|
||||||
server.username = "www-data"
|
server.username = "www-data"
|
||||||
server.groupname = "www-data"
|
server.groupname = "www-data"
|
||||||
server.document-root = var.basedir
|
server.document-root = var.basedir
|
||||||
server.pid-file = "/var/run/lighttpd.pid"
|
server.pid-file = "/var/run/lighttpd.pid"
|
||||||
accesslog.filename = var.logdir + "/access.log"
|
accesslog.filename = var.logdir + "/access.log"
|
||||||
server.errorlog = var.logdir + "/error.log"
|
server.errorlog = var.logdir + "/error.log"
|
||||||
|
|
||||||
server.indexfiles = ("index.php", "index.html",
|
server.indexfiles = ("index.php", "index.html",
|
||||||
"index.htm", "default.htm")
|
"index.htm", "default.htm")
|
||||||
|
|
||||||
server.name = "<SERVERNAME>"
|
server.name = "<SERVERNAME>"
|
||||||
server.port = 80
|
server.port = 80
|
||||||
server.bind = "<SERVERIP>"
|
server.bind = "<SERVERIP>"
|
||||||
url.access-deny = ("~", ".inc")
|
url.access-deny = ("~", ".inc")
|
||||||
|
|
||||||
fastcgi.server = (
|
fastcgi.server = (
|
||||||
".php" => (
|
".php" => (
|
||||||
"localhost" => (
|
"localhost" => (
|
||||||
"socket" => "/var/kunden/tmp/lighttpd-fcgi-sock-lighttpd",
|
"socket" => "/var/kunden/tmp/lighttpd-fcgi-sock-lighttpd",
|
||||||
"broken-scriptfilename" => "enable",
|
"broken-scriptfilename" => "enable",
|
||||||
"bin-path" => "/usr/bin/php5-cgi",
|
"bin-path" => "/usr/bin/php5-cgi",
|
||||||
"min-procs" => 1,
|
"min-procs" => 1,
|
||||||
"max-procs" => 1,
|
"max-procs" => 1,
|
||||||
"max-load-per-proc" => 4,
|
"max-load-per-proc" => 4,
|
||||||
"idle-timeout" => 60,
|
"idle-timeout" => 60,
|
||||||
"bin-environment" => (
|
"bin-environment" => (
|
||||||
"UID" => "www-data",
|
"UID" => "www-data",
|
||||||
"GID" => "www-data",
|
"GID" => "www-data",
|
||||||
"PHP_FCGI_CHILDREN" => "0",
|
"PHP_FCGI_CHILDREN" => "0",
|
||||||
"PHP_FCGI_MAX_REQUESTS" => "10000"
|
"PHP_FCGI_MAX_REQUESTS" => "10000"
|
||||||
),
|
),
|
||||||
"bin-copy-environment" => ( "" )
|
"bin-copy-environment" => ( "" )
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
#### external configuration files
|
#### external configuration files
|
||||||
## mimetype mapping
|
## mimetype mapping
|
||||||
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
|
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
|
||||||
|
|
||||||
## load enabled configuration files,
|
## load enabled configuration files,
|
||||||
## read /etc/lighttpd/conf-available/README first
|
## read /etc/lighttpd/conf-available/README first
|
||||||
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
|
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
|
||||||
@@ -4,5 +4,5 @@ dbname = <SQL_DB>
|
|||||||
table = mail_virtual
|
table = mail_virtual
|
||||||
select_field = destination
|
select_field = destination
|
||||||
where_field = email
|
where_field = email
|
||||||
additional_conditions = and destination <> '' and destination <> ' '
|
additional_conditions = and TRIM(destination) <> ''
|
||||||
hosts = <SQL_HOST>
|
hosts = <SQL_HOST>
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
allow-recursion=127.0.0.1
|
allow-recursion=127.0.0.1
|
||||||
config-dir=/etc/powerdns
|
config-dir=/etc/powerdns
|
||||||
daemon=yes
|
daemon=yes
|
||||||
guardian=yes
|
guardian=yes
|
||||||
launch=bind
|
launch=bind
|
||||||
lazy-recursion=yes
|
lazy-recursion=yes
|
||||||
local-port=53
|
local-port=53
|
||||||
master=yes
|
master=yes
|
||||||
module-dir=/usr/lib/powerdns
|
module-dir=/usr/lib/powerdns
|
||||||
setgid=pdns
|
setgid=pdns
|
||||||
setuid=pdns
|
setuid=pdns
|
||||||
socket-dir=/var/run
|
socket-dir=/var/run
|
||||||
version-string=powerdns
|
version-string=powerdns
|
||||||
bind-config=/etc/bind/named.conf
|
bind-config=/etc/bind/named.conf
|
||||||
bind-check-interval=300
|
bind-check-interval=300
|
||||||
include=/etc/powerdns/pdns_syscp.conf
|
include=/etc/powerdns/pdns_froxlor.conf
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
service froxlor
|
||||||
|
{
|
||||||
|
id = froxlor
|
||||||
|
socket_type = dgram
|
||||||
|
protocol = udp
|
||||||
|
wait = no
|
||||||
|
|
||||||
|
user = root
|
||||||
|
server = /usr/bin/php
|
||||||
|
server_args = -q /var/www/froxlor/scripts/cron_tasks.php
|
||||||
|
|
||||||
|
bind = 127.0.0.1
|
||||||
|
only_from = 127.0.0.1
|
||||||
|
|
||||||
|
type = UNLISTED
|
||||||
|
port = <REALTIME_PORT>
|
||||||
|
disable = no
|
||||||
|
|
||||||
|
log_type = SYSLOG daemon info
|
||||||
|
log_on_success = HOST DURATION
|
||||||
|
log_on_failure = HOST ATTEMPT
|
||||||
|
}
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
service syscp
|
|
||||||
{
|
|
||||||
id = syscp
|
|
||||||
socket_type = dgram
|
|
||||||
protocol = tcp
|
|
||||||
wait = no
|
|
||||||
user = root
|
|
||||||
server = /usr/bin/php
|
|
||||||
server_args = -q /var/www/syscp/scripts/cron_tasks.php
|
|
||||||
only_from = 127.0.0.1
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
# Set PATH, otherwise restart-scripts won't find start-stop-daemon
|
# Set PATH, otherwise restart-scripts won't find start-stop-daemon
|
||||||
#
|
#
|
||||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
|
|
||||||
*/10 * * * * www-data [ -x /usr/bin/awstats_updateall.pl ] && /usr/bin/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl -configdir=/etc/awstats -excludeconf=awstats.model.conf.syscp,awstats.conf
|
*/10 * * * * www-data [ -x /usr/bin/awstats_updateall.pl ] && /usr/bin/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl -configdir=/etc/awstats -excludeconf=awstats.model.conf.froxlor,awstats.conf
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
# Set PATH, otherwise restart-scripts won't find start-stop-daemon
|
# Set PATH, otherwise restart-scripts won't find start-stop-daemon
|
||||||
#
|
#
|
||||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
|
|
||||||
45 0 * * * www-data [ -x /usr/bin/awstats_updateall.pl ] && /usr/bin/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl -configdir=/etc/awstats -excludeconf=awstats.model.conf.syscp,awstats.conf
|
45 0 * * * www-data [ -x /usr/bin/awstats_updateall.pl ] && /usr/bin/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl -configdir=/etc/awstats -excludeconf=awstats.model.conf.froxlor,awstats.conf
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
#
|
||||||
|
# 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/cron_tasks.php
|
||||||
|
0 0 * * * root /usr/bin/php5 -q /var/www/froxlor/scripts/cron_traffic.php
|
||||||
|
30 0 * * * root /usr/bin/php5 -q /var/www/froxlor/scripts/cron_ticketarchive.php
|
||||||
|
0 1 * * * root /usr/bin/php5 -q /var/www/froxlor/scripts/cron_used_tickets_reset.php
|
||||||
|
*/5 * * * * root /usr/bin/php5 -q /var/www/froxlor/scripts/cron_autoresponder.php
|
||||||
|
*/5 * * * * root /usr/bin/php5 -q /var/www/froxlor/scripts/cron_apsinstaller.php
|
||||||
|
*/30 * * * * root /usr/bin/php5 -q /var/www/froxlor/scripts/cron_apsupdater.php
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
#
|
|
||||||
# Set PATH, otherwise restart-scripts won't find start-stop-daemon
|
|
||||||
#
|
|
||||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
|
||||||
#
|
|
||||||
# Regular cron jobs for the syscp package
|
|
||||||
#
|
|
||||||
*/5 * * * * root /usr/bin/php5 -q /var/www/syscp/scripts/cron_tasks.php
|
|
||||||
0 0 * * * root /usr/bin/php5 -q /var/www/syscp/scripts/cron_traffic.php
|
|
||||||
30 0 * * * root /usr/bin/php5 -q /var/www/syscp/scripts/cron_ticketarchive.php
|
|
||||||
0 1 * * * root /usr/bin/php5 -q /var/www/syscp/scripts/cron_used_tickets_reset.php
|
|
||||||
*/5 * * * * root /usr/bin/php5 -q /var/www/syscp/scripts/cron_autoresponder.php
|
|
||||||
*/5 * * * * root /usr/bin/php5 -q /var/www/syscp/scripts/cron_apsinstaller.php
|
|
||||||
*/30 * * * * root /usr/bin/php5 -q /var/www/syscp/scripts/cron_apsupdater.php
|
|
||||||
@@ -11,7 +11,7 @@ acl_check_rcpt:
|
|||||||
|
|
||||||
.ifdef CHECK_RCPT_LOCAL_LOCALPARTS
|
.ifdef CHECK_RCPT_LOCAL_LOCALPARTS
|
||||||
deny
|
deny
|
||||||
domains = +local_domains:+syscp_domain
|
domains = +local_domains:+froxlor_domain
|
||||||
local_parts = CHECK_RCPT_LOCAL_LOCALPARTS
|
local_parts = CHECK_RCPT_LOCAL_LOCALPARTS
|
||||||
message = restricted characters in address
|
message = restricted characters in address
|
||||||
.endif
|
.endif
|
||||||
@@ -29,7 +29,7 @@ acl_check_rcpt:
|
|||||||
.else
|
.else
|
||||||
local_parts = CHECK_RCPT_POSTMASTER
|
local_parts = CHECK_RCPT_POSTMASTER
|
||||||
.endif
|
.endif
|
||||||
domains = +local_domains:+syscp_domain
|
domains = +local_domains:+froxlor_domain
|
||||||
|
|
||||||
deny
|
deny
|
||||||
message = sender envelope address $sender_address is locally blacklisted here. If you think this is wrong, get in touch with postmaster
|
message = sender envelope address $sender_address is locally blacklisted here. If you think this is wrong, get in touch with postmaster
|
||||||
@@ -95,7 +95,7 @@ acl_check_rcpt:
|
|||||||
.endif
|
.endif
|
||||||
|
|
||||||
accept
|
accept
|
||||||
domains = +local_domains:+syscp_domain
|
domains = +local_domains:+froxlor_domain
|
||||||
endpass
|
endpass
|
||||||
message = unknown user
|
message = unknown user
|
||||||
verify = recipient
|
verify = recipient
|
||||||
|
|||||||
@@ -1,30 +1,30 @@
|
|||||||
### auth/30_syscp-config
|
### auth/30_froxlor-config
|
||||||
#################################
|
#################################
|
||||||
|
|
||||||
plain_server:
|
plain_server:
|
||||||
driver = plaintext
|
driver = plaintext
|
||||||
public_name = PLAIN
|
public_name = PLAIN
|
||||||
server_condition = "${if and { \
|
server_condition = "${if and { \
|
||||||
{!eq{$2}{}} \
|
{!eq{$2}{}} \
|
||||||
{!eq{$3}{}} \
|
{!eq{$3}{}} \
|
||||||
{crypteq{$3}{${lookup mysql{SYSCP_AUTH_PLAIN}{$value}fail}}} \
|
{crypteq{$3}{${lookup mysql{FROXLOR_AUTH_PLAIN}{$value}fail}}} \
|
||||||
} {yes}{no}}"
|
} {yes}{no}}"
|
||||||
server_set_id = $2
|
server_set_id = $2
|
||||||
server_prompts = :
|
server_prompts = :
|
||||||
# .ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS
|
# .ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS
|
||||||
# server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}}
|
# server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}}
|
||||||
# .endif
|
# .endif
|
||||||
|
|
||||||
login_server:
|
login_server:
|
||||||
driver = plaintext
|
driver = plaintext
|
||||||
public_name = LOGIN
|
public_name = LOGIN
|
||||||
server_prompts = "Username:: : Password::"
|
server_prompts = "Username:: : Password::"
|
||||||
server_condition = "${if and { \
|
server_condition = "${if and { \
|
||||||
{!eq{$1}{}} \
|
{!eq{$1}{}} \
|
||||||
{!eq{$2}{}} \
|
{!eq{$2}{}} \
|
||||||
{crypteq{$2}{${lookup mysql{SYSCP_AUTH_LOGIN}{$value}fail}}} \
|
{crypteq{$2}{${lookup mysql{FROXLOR_AUTH_LOGIN}{$value}fail}}} \
|
||||||
} {yes}{no}}"
|
} {yes}{no}}"
|
||||||
server_set_id = $1
|
server_set_id = $1
|
||||||
# .ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS
|
# .ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS
|
||||||
# server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}}
|
# server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}}
|
||||||
# .endif
|
# .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
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
hide mysql_servers = <SQL_HOST>/<SQL_DB>/<SQL_UNPRIVILEGED_USER>/<SQL_UNPRIVILEGED_PASSWORD>
|
|
||||||
|
|
||||||
SYSCP_LOCAL_DOMAIN = SELECT domain FROM panel_domains WHERE domain = '${quote_mysql:$domain}' AND isemaildomain = '1'
|
|
||||||
|
|
||||||
SYSCP_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
|
|
||||||
|
|
||||||
SYSCP_MAILUSER = SELECT CONCAT(homedir,maildir) FROM mail_users WHERE \
|
|
||||||
email = '${quote_mysql:$local_part}@${quote_mysql:$domain}' AND postfix = 'y'
|
|
||||||
|
|
||||||
SYSCP_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
|
|
||||||
|
|
||||||
SYSCP_AUTH_PLAIN = SELECT password_enc FROM mail_users WHERE username = '${quote_mysql:$2}'
|
|
||||||
|
|
||||||
SYSCP_AUTH_LOGIN = SELECT password_enc FROM mail_users WHERE username = '${quote_mysql:$1}'
|
|
||||||
|
|
||||||
domainlist syscp_domain = mysql;SYSCP_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
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
syscp_mailalias:
|
|
||||||
debug_print = "R: syscp_mailalias for $local_part@$domain"
|
|
||||||
driver = redirect
|
|
||||||
domains = +syscp_domain
|
|
||||||
data = ${lookup mysql {SYSCP_MAILALIAS}{$value}fail}
|
|
||||||
|
|
||||||
syscp_mailuser:
|
|
||||||
debug_print = "R: syscp_mailuser for $local_part@$domain"
|
|
||||||
driver = redirect
|
|
||||||
domains = +syscp_domain
|
|
||||||
data = ${lookup mysql {SYSCP_MAILUSER}{$value}fail}
|
|
||||||
directory_transport = maildir_syscp
|
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
maildir_syscp:
|
maildir_froxlor:
|
||||||
debug_print = "T: maildir_syscp for $local_part@$domain"
|
debug_print = "T: maildir_froxlor for $local_part@$domain"
|
||||||
driver = appendfile
|
driver = appendfile
|
||||||
create_directory
|
create_directory
|
||||||
delivery_date_add
|
delivery_date_add
|
||||||
envelope_to_add
|
envelope_to_add
|
||||||
return_path_add
|
return_path_add
|
||||||
maildir_format
|
maildir_format
|
||||||
directory_mode = 0770
|
directory_mode = 0770
|
||||||
mode = 0660
|
mode = 0660
|
||||||
mode_fail_narrower = false
|
mode_fail_narrower = false
|
||||||
user = 2000
|
user = 2000
|
||||||
group = 2000
|
group = 2000
|
||||||
@@ -1,60 +1,60 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# Default lighttpd.conf for SysCP.
|
# Default lighttpd.conf for Froxlor.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
var.basedir = "/var/www"
|
var.basedir = "/var/www"
|
||||||
var.logdir = "/var/log/lighttpd"
|
var.logdir = "/var/log/lighttpd"
|
||||||
var.statedir = "/var/lib/lighttpd"
|
var.statedir = "/var/lib/lighttpd"
|
||||||
|
|
||||||
server.modules = (
|
server.modules = (
|
||||||
"mod_rewrite",
|
"mod_rewrite",
|
||||||
"mod_redirect",
|
"mod_redirect",
|
||||||
"mod_alias",
|
"mod_alias",
|
||||||
"mod_access",
|
"mod_access",
|
||||||
"mod_auth",
|
"mod_auth",
|
||||||
"mod_fastcgi",
|
"mod_fastcgi",
|
||||||
"mod_accesslog"
|
"mod_accesslog"
|
||||||
)
|
)
|
||||||
|
|
||||||
server.username = "www-data"
|
server.username = "www-data"
|
||||||
server.groupname = "www-data"
|
server.groupname = "www-data"
|
||||||
server.document-root = var.basedir
|
server.document-root = var.basedir
|
||||||
server.pid-file = "/var/run/lighttpd.pid"
|
server.pid-file = "/var/run/lighttpd.pid"
|
||||||
accesslog.filename = var.logdir + "/access.log"
|
accesslog.filename = var.logdir + "/access.log"
|
||||||
server.errorlog = var.logdir + "/error.log"
|
server.errorlog = var.logdir + "/error.log"
|
||||||
|
|
||||||
server.indexfiles = ("index.php", "index.html",
|
server.indexfiles = ("index.php", "index.html",
|
||||||
"index.htm", "default.htm")
|
"index.htm", "default.htm")
|
||||||
|
|
||||||
server.name = "<SERVERNAME>"
|
server.name = "<SERVERNAME>"
|
||||||
server.port = 80
|
server.port = 80
|
||||||
server.bind = "<SERVERIP>"
|
server.bind = "<SERVERIP>"
|
||||||
url.access-deny = ("~", ".inc")
|
url.access-deny = ("~", ".inc")
|
||||||
|
|
||||||
fastcgi.server = (
|
fastcgi.server = (
|
||||||
".php" => (
|
".php" => (
|
||||||
"localhost" => (
|
"localhost" => (
|
||||||
"socket" => "/var/kunden/tmp/lighttpd-fcgi-sock-lighttpd",
|
"socket" => "/var/kunden/tmp/lighttpd-fcgi-sock-lighttpd",
|
||||||
"broken-scriptfilename" => "enable",
|
"broken-scriptfilename" => "enable",
|
||||||
"bin-path" => "/usr/bin/php5-cgi",
|
"bin-path" => "/usr/bin/php5-cgi",
|
||||||
"min-procs" => 1,
|
"min-procs" => 1,
|
||||||
"max-procs" => 1,
|
"max-procs" => 1,
|
||||||
"max-load-per-proc" => 4,
|
"max-load-per-proc" => 4,
|
||||||
"idle-timeout" => 60,
|
"idle-timeout" => 60,
|
||||||
"bin-environment" => (
|
"bin-environment" => (
|
||||||
"UID" => "www-data",
|
"UID" => "www-data",
|
||||||
"GID" => "www-data",
|
"GID" => "www-data",
|
||||||
"PHP_FCGI_CHILDREN" => "0",
|
"PHP_FCGI_CHILDREN" => "0",
|
||||||
"PHP_FCGI_MAX_REQUESTS" => "10000"
|
"PHP_FCGI_MAX_REQUESTS" => "10000"
|
||||||
),
|
),
|
||||||
"bin-copy-environment" => ( "" )
|
"bin-copy-environment" => ( "" )
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
#### external configuration files
|
#### external configuration files
|
||||||
## mimetype mapping
|
## mimetype mapping
|
||||||
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
|
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
|
||||||
|
|
||||||
## load enabled configuration files,
|
## load enabled configuration files,
|
||||||
## read /etc/lighttpd/conf-available/README first
|
## read /etc/lighttpd/conf-available/README first
|
||||||
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
|
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
user = <SQL_UNPRIVILEGED_USER>
|
user = <SQL_UNPRIVILEGED_USER>
|
||||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
password = <SQL_UNPRIVILEGED_PASSWORD>
|
||||||
dbname = <SQL_DB>
|
dbname = <SQL_DB>
|
||||||
table = mail_virtual
|
table = mail_virtual
|
||||||
select_field = destination
|
select_field = destination
|
||||||
where_field = email
|
where_field = email
|
||||||
additional_conditions = and destination <> '' and destination <> ' '
|
additional_conditions = and TRIM(destination) <> ''
|
||||||
hosts = <SQL_HOST>
|
hosts = <SQL_HOST>
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
allow-recursion=127.0.0.1
|
allow-recursion=127.0.0.1
|
||||||
config-dir=/etc/powerdns
|
config-dir=/etc/powerdns
|
||||||
daemon=yes
|
daemon=yes
|
||||||
guardian=yes
|
guardian=yes
|
||||||
launch=bind
|
launch=bind
|
||||||
lazy-recursion=yes
|
lazy-recursion=yes
|
||||||
local-port=53
|
local-port=53
|
||||||
master=yes
|
master=yes
|
||||||
module-dir=/usr/lib/powerdns
|
module-dir=/usr/lib/powerdns
|
||||||
setgid=pdns
|
setgid=pdns
|
||||||
setuid=pdns
|
setuid=pdns
|
||||||
socket-dir=/var/run
|
socket-dir=/var/run
|
||||||
version-string=powerdns
|
version-string=powerdns
|
||||||
bind-config=/etc/bind/named.conf
|
bind-config=/etc/bind/named.conf
|
||||||
bind-check-interval=300
|
bind-check-interval=300
|
||||||
include=/etc/powerdns/pdns_syscp.conf
|
include=/etc/powerdns/pdns_froxlor.conf
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
service froxlor
|
||||||
|
{
|
||||||
|
id = froxlor
|
||||||
|
socket_type = dgram
|
||||||
|
protocol = udp
|
||||||
|
wait = no
|
||||||
|
|
||||||
|
user = root
|
||||||
|
server = /usr/bin/php
|
||||||
|
server_args = -q /var/www/froxlor/scripts/cron_tasks.php
|
||||||
|
|
||||||
|
bind = 127.0.0.1
|
||||||
|
only_from = 127.0.0.1
|
||||||
|
|
||||||
|
type = UNLISTED
|
||||||
|
port = <REALTIME_PORT>
|
||||||
|
disable = no
|
||||||
|
|
||||||
|
log_type = SYSLOG daemon info
|
||||||
|
log_on_success = HOST DURATION
|
||||||
|
log_on_failure = HOST ATTEMPT
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
service syscp
|
|
||||||
{
|
|
||||||
id = syscp
|
|
||||||
socket_type = dgram
|
|
||||||
protocol = tcp
|
|
||||||
wait = no
|
|
||||||
user = root
|
|
||||||
server = /usr/bin/php
|
|
||||||
server_args = -q /var/www/syscp/scripts/cron_tasks.php
|
|
||||||
only_from = 127.0.0.1
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
# Set PATH, otherwise restart-scripts won't find start-stop-daemon
|
# Set PATH, otherwise restart-scripts won't find start-stop-daemon
|
||||||
#
|
#
|
||||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
|
|
||||||
*/10 * * * * apache [ -x /usr/bin/awstats_updateall.pl ] && /usr/bin/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl -configdir=/etc/awstats -excludeconf=awstats.model.conf.syscp,awstats.conf
|
*/10 * * * * apache [ -x /usr/bin/awstats_updateall.pl ] && /usr/bin/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl -configdir=/etc/awstats -excludeconf=awstats.model.conf.froxlor,awstats.conf
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
# Set PATH, otherwise restart-scripts won't find start-stop-daemon
|
# Set PATH, otherwise restart-scripts won't find start-stop-daemon
|
||||||
#
|
#
|
||||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
|
|
||||||
45 0 * * * apache [ -x /usr/bin/awstats_updateall.pl ] && /usr/bin/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl -configdir=/etc/awstats -excludeconf=awstats.model.conf.syscp,awstats.conf
|
45 0 * * * apache [ -x /usr/bin/awstats_updateall.pl ] && /usr/bin/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl -configdir=/etc/awstats -excludeconf=awstats.model.conf.froxlor,awstats.conf
|
||||||
16
templates/misc/configfiles/gentoo/cron/etc_cron.d_froxlor
Normal file
16
templates/misc/configfiles/gentoo/cron/etc_cron.d_froxlor
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#
|
||||||
|
# Set PATH, otherwise restart-scripts won't find start-stop-daemon
|
||||||
|
#
|
||||||
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
|
#
|
||||||
|
# Regular cron jobs for the froxlor package
|
||||||
|
#
|
||||||
|
# Please check that all following paths are correct
|
||||||
|
#
|
||||||
|
*/5 * * * * root /usr/lib/php5/bin/php -q /var/www/froxlor/scripts/cron_tasks.php
|
||||||
|
0 0 * * * root /usr/lib/php5/bin/php -q /var/www/froxlor/scripts/cron_traffic.php
|
||||||
|
30 0 * * * root /usr/lib/php5/bin/php -q /var/www/froxlor/scripts/cron_ticketarchive.php
|
||||||
|
0 1 * * * root /usr/lib/php5/bin/php -q /var/www/froxlor/scripts/cron_used_tickets_reset.php
|
||||||
|
*/5 * * * * root /usr/lib/php5/bin/php -q /var/www/froxlor/scripts/cron_autoresponder.php
|
||||||
|
*/5 * * * * root /usr/lib/php5/bin/php -q /var/www/froxlor/scripts/cron_apsinstaller.php
|
||||||
|
*/30 * * * * root /usr/lib/php5/bin/php -q /var/www/froxlor/scripts/cron_apsupdater.php
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
#
|
|
||||||
# Set PATH, otherwise restart-scripts won't find start-stop-daemon
|
|
||||||
#
|
|
||||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
|
||||||
#
|
|
||||||
# Regular cron jobs for the syscp package
|
|
||||||
#
|
|
||||||
# Please check that all following paths are correct
|
|
||||||
#
|
|
||||||
*/5 * * * * root /usr/lib/php5/bin/php -q -c /etc/php/syscp-cronjob/php.ini /var/www/syscp/scripts/cron_tasks.php
|
|
||||||
0 0 * * * root /usr/lib/php5/bin/php -q -c /etc/php/syscp-cronjob/php.ini /var/www/syscp/scripts/cron_traffic.php
|
|
||||||
30 0 * * * root /usr/lib/php5/bin/php -q -c /etc/php/syscp-cronjob/php.ini /var/www/syscp/scripts/cron_ticketarchive.php
|
|
||||||
0 1 * * * root /usr/lib/php5/bin/php -q -c /etc/php/syscp-cronjob/php.ini /var/www/syscp/scripts/cron_used_tickets_reset.php
|
|
||||||
*/5 * * * * root /usr/lib/php5/bin/php -q -c /etc/php/syscp-cronjob/php.ini /var/www/syscp/scripts/cron_autoresponder.php
|
|
||||||
*/5 * * * * root /usr/lib/php5/bin/php -q -c /etc/php/syscp-cronjob/php.ini /var/www/syscp/scripts/cron_apsinstaller.php
|
|
||||||
*/30 * * * * root /usr/lib/php5/bin/php -q -c /etc/php/syscp-cronjob/php.ini /var/www/syscp/scripts/cron_apsupdater.php
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
short_open_tag = On
|
|
||||||
asp_tags = Off
|
|
||||||
precision = 14
|
|
||||||
output_buffering = Off
|
|
||||||
allow_call_time_pass_reference = Off
|
|
||||||
safe_mode = Off
|
|
||||||
safe_mode_gid = Off
|
|
||||||
safe_mode_include_dir = "/usr/share/php/:/usr/share/php4/:/usr/share/php5/"
|
|
||||||
safe_mode_allowed_env_vars = PHP_
|
|
||||||
safe_mode_protected_env_vars = LD_LIBRARY_PATH
|
|
||||||
open_basedir =
|
|
||||||
disable_functions =
|
|
||||||
disable_classes =
|
|
||||||
expose_php = Off
|
|
||||||
max_execution_time = 180
|
|
||||||
max_input_time = 120
|
|
||||||
memory_limit = 32M
|
|
||||||
post_max_size = 32M
|
|
||||||
error_reporting = E_ALL & ~E_NOTICE
|
|
||||||
display_errors = On
|
|
||||||
display_startup_errors = Off
|
|
||||||
log_errors = Off
|
|
||||||
log_errors_max_len = 1024
|
|
||||||
ignore_repeated_errors = Off
|
|
||||||
ignore_repeated_source = Off
|
|
||||||
report_memleaks = On
|
|
||||||
track_errors = Off
|
|
||||||
html_errors = Off
|
|
||||||
variables_order = "GPCS"
|
|
||||||
register_globals = Off
|
|
||||||
register_argc_argv = Off
|
|
||||||
gpc_order = "GPC"
|
|
||||||
magic_quotes_gpc = Off
|
|
||||||
magic_quotes_runtime = Off
|
|
||||||
magic_quotes_sybase = Off
|
|
||||||
include_path = ".:/usr/share/php/:/usr/share/php4/:/usr/share/php5/"
|
|
||||||
enable_dl = Off
|
|
||||||
file_uploads = On
|
|
||||||
upload_tmp_dir = "/tmp/"
|
|
||||||
upload_max_filesize = 32M
|
|
||||||
allow_url_fopen = On
|
|
||||||
session.save_handler = files
|
|
||||||
session.save_path = "/tmp/"
|
|
||||||
session.use_cookies = 1
|
|
||||||
session.name = PHPSESSID
|
|
||||||
session.auto_start = 0
|
|
||||||
session.cookie_lifetime = 0
|
|
||||||
session.cookie_path = /
|
|
||||||
session.cookie_domain =
|
|
||||||
session.serialize_handler = php
|
|
||||||
session.gc_probability = 1
|
|
||||||
session.gc_divisor = 1000
|
|
||||||
session.gc_maxlifetime = 1440
|
|
||||||
session.bug_compat_42 = 0
|
|
||||||
session.bug_compat_warn = 1
|
|
||||||
session.referer_check =
|
|
||||||
session.entropy_length = 16
|
|
||||||
session.entropy_file = /dev/urandom
|
|
||||||
session.cache_limiter = nocache
|
|
||||||
session.cache_expire = 180
|
|
||||||
session.use_trans_sid = 0
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
short_open_tag = On
|
|
||||||
asp_tags = Off
|
|
||||||
precision = 14
|
|
||||||
output_buffering = 4096
|
|
||||||
allow_call_time_pass_reference = Off
|
|
||||||
safe_mode = Off
|
|
||||||
safe_mode_gid = Off
|
|
||||||
safe_mode_include_dir = "/usr/share/php/:/usr/share/php4/:/usr/share/php5/"
|
|
||||||
safe_mode_allowed_env_vars = PHP_
|
|
||||||
safe_mode_protected_env_vars = LD_LIBRARY_PATH
|
|
||||||
open_basedir = "/var/www/syscp/:/var/www/syscp-suphp/syscp/:/var/www/syscpwebs/:/usr/share/php/:/usr/share/php4/:/usr/share/php5/"
|
|
||||||
disable_functions = exec,passthru,shell_exec,system,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate
|
|
||||||
disable_classes =
|
|
||||||
expose_php = Off
|
|
||||||
max_execution_time = 30
|
|
||||||
max_input_time = 60
|
|
||||||
memory_limit = 16M
|
|
||||||
post_max_size = 12M
|
|
||||||
error_reporting = E_ALL & ~E_NOTICE
|
|
||||||
display_errors = Off
|
|
||||||
display_startup_errors = Off
|
|
||||||
log_errors = On
|
|
||||||
log_errors_max_len = 1024
|
|
||||||
ignore_repeated_errors = Off
|
|
||||||
ignore_repeated_source = Off
|
|
||||||
report_memleaks = On
|
|
||||||
track_errors = Off
|
|
||||||
html_errors = Off
|
|
||||||
variables_order = "GPCS"
|
|
||||||
register_globals = Off
|
|
||||||
register_argc_argv = Off
|
|
||||||
gpc_order = "GPC"
|
|
||||||
magic_quotes_gpc = Off
|
|
||||||
magic_quotes_runtime = Off
|
|
||||||
magic_quotes_sybase = Off
|
|
||||||
include_path = ".:/usr/share/php/:/usr/share/php4/:/usr/share/php5/"
|
|
||||||
enable_dl = Off
|
|
||||||
file_uploads = On
|
|
||||||
upload_tmp_dir = "/var/www/syscp-suphp/syscp/"
|
|
||||||
upload_max_filesize = 32M
|
|
||||||
allow_url_fopen = Off
|
|
||||||
session.save_handler = files
|
|
||||||
session.save_path = "/var/www/syscp-suphp/syscp/"
|
|
||||||
session.use_cookies = 1
|
|
||||||
session.name = PHPSESSID
|
|
||||||
session.auto_start = 0
|
|
||||||
session.cookie_lifetime = 0
|
|
||||||
session.cookie_path = /
|
|
||||||
session.cookie_domain =
|
|
||||||
session.serialize_handler = php
|
|
||||||
session.gc_probability = 1
|
|
||||||
session.gc_divisor = 1000
|
|
||||||
session.gc_maxlifetime = 1440
|
|
||||||
session.bug_compat_42 = 0
|
|
||||||
session.bug_compat_warn = 1
|
|
||||||
session.referer_check =
|
|
||||||
session.entropy_length = 16
|
|
||||||
session.entropy_file = /dev/urandom
|
|
||||||
session.cache_limiter = nocache
|
|
||||||
session.cache_expire = 180
|
|
||||||
session.use_trans_sid = 0
|
|
||||||
@@ -1,55 +1,55 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# Default lighttpd.conf for SysCP.
|
# Default lighttpd.conf for Froxlor.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
var.basedir = "/var/www"
|
var.basedir = "/var/www"
|
||||||
var.logdir = "/var/log/lighttpd"
|
var.logdir = "/var/log/lighttpd"
|
||||||
var.statedir = "/var/lib/lighttpd"
|
var.statedir = "/var/lib/lighttpd"
|
||||||
|
|
||||||
server.modules = (
|
server.modules = (
|
||||||
"mod_rewrite",
|
"mod_rewrite",
|
||||||
"mod_redirect",
|
"mod_redirect",
|
||||||
"mod_alias",
|
"mod_alias",
|
||||||
"mod_access",
|
"mod_access",
|
||||||
"mod_auth",
|
"mod_auth",
|
||||||
"mod_fastcgi",
|
"mod_fastcgi",
|
||||||
"mod_accesslog"
|
"mod_accesslog"
|
||||||
)
|
)
|
||||||
|
|
||||||
server.username = "lighttpd"
|
server.username = "lighttpd"
|
||||||
server.groupname = "lighttpd"
|
server.groupname = "lighttpd"
|
||||||
server.document-root = var.basedir
|
server.document-root = var.basedir
|
||||||
server.pid-file = "/var/run/lighttpd.pid"
|
server.pid-file = "/var/run/lighttpd.pid"
|
||||||
accesslog.filename = var.logdir + "/access.log"
|
accesslog.filename = var.logdir + "/access.log"
|
||||||
server.errorlog = var.logdir + "/error.log"
|
server.errorlog = var.logdir + "/error.log"
|
||||||
|
|
||||||
server.indexfiles = ("index.php", "index.html",
|
server.indexfiles = ("index.php", "index.html",
|
||||||
"index.htm", "default.htm")
|
"index.htm", "default.htm")
|
||||||
|
|
||||||
server.name = "<SERVERNAME>"
|
server.name = "<SERVERNAME>"
|
||||||
server.port = 80
|
server.port = 80
|
||||||
server.bind = "<SERVERIP>"
|
server.bind = "<SERVERIP>"
|
||||||
url.access-deny = ("~", ".inc")
|
url.access-deny = ("~", ".inc")
|
||||||
|
|
||||||
include "mime-types.conf"
|
include "mime-types.conf"
|
||||||
include "syscp-vhosts.conf"
|
include "syscp-vhosts.conf"
|
||||||
|
|
||||||
fastcgi.server = (
|
fastcgi.server = (
|
||||||
".php" => (
|
".php" => (
|
||||||
"localhost" => (
|
"localhost" => (
|
||||||
"socket" => "/tmp/lighttpd-fcgi-sock-lighttpd",
|
"socket" => "/tmp/lighttpd-fcgi-sock-lighttpd",
|
||||||
"broken-scriptfilename" => "enable",
|
"broken-scriptfilename" => "enable",
|
||||||
"bin-path" => "/usr/bin/php-cgi",
|
"bin-path" => "/usr/bin/php-cgi",
|
||||||
"min-procs" => 1,
|
"min-procs" => 1,
|
||||||
"max-procs" => 1,
|
"max-procs" => 1,
|
||||||
"max-load-per-proc" => 4,
|
"max-load-per-proc" => 4,
|
||||||
"idle-timeout" => 60,
|
"idle-timeout" => 60,
|
||||||
"bin-environment" => (
|
"bin-environment" => (
|
||||||
"UID" => "lighttpd",
|
"UID" => "lighttpd",
|
||||||
"GID" => "lighttpd",
|
"GID" => "lighttpd",
|
||||||
"PHP_FCGI_CHILDREN" => "0",
|
"PHP_FCGI_CHILDREN" => "0",
|
||||||
"PHP_FCGI_MAX_REQUESTS" => "10000"
|
"PHP_FCGI_MAX_REQUESTS" => "10000"
|
||||||
),
|
),
|
||||||
"bin-copy-environment" => ( "" )
|
"bin-copy-environment" => ( "" )
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
user = <SQL_UNPRIVILEGED_USER>
|
user = <SQL_UNPRIVILEGED_USER>
|
||||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
password = <SQL_UNPRIVILEGED_PASSWORD>
|
||||||
dbname = <SQL_DB>
|
dbname = <SQL_DB>
|
||||||
table = mail_virtual
|
table = mail_virtual
|
||||||
select_field = destination
|
select_field = destination
|
||||||
where_field = email
|
where_field = email
|
||||||
additional_conditions = and destination <> '' and destination <> ' '
|
additional_conditions = and TRIM(destination) <> ''
|
||||||
hosts = <SQL_HOST>
|
hosts = <SQL_HOST>
|
||||||
|
|||||||
23
templates/misc/configfiles/gentoo/xinetd/etc_xinet.d_froxlor
Normal file
23
templates/misc/configfiles/gentoo/xinetd/etc_xinet.d_froxlor
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
service froxlor
|
||||||
|
{
|
||||||
|
id = froxlor
|
||||||
|
socket_type = dgram
|
||||||
|
protocol = udp
|
||||||
|
wait = no
|
||||||
|
|
||||||
|
user = root
|
||||||
|
server = /usr/bin/php
|
||||||
|
server_args = -q /var/www/froxlor/scripts/cron_tasks.php
|
||||||
|
|
||||||
|
bind = 127.0.0.1
|
||||||
|
only_from = 127.0.0.1
|
||||||
|
|
||||||
|
type = UNLISTED
|
||||||
|
port = <REALTIME_PORT>
|
||||||
|
disable = no
|
||||||
|
|
||||||
|
log_type = SYSLOG daemon info
|
||||||
|
log_on_success = HOST DURATION
|
||||||
|
log_on_failure = HOST ATTEMPT
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
service syscp
|
|
||||||
{
|
|
||||||
id = syscp
|
|
||||||
socket_type = dgram
|
|
||||||
protocol = tcp
|
|
||||||
wait = no
|
|
||||||
user = root
|
|
||||||
server = /usr/bin/php
|
|
||||||
server_args = -q /var/www/syscp/scripts/cron_tasks.php
|
|
||||||
only_from = 127.0.0.1
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
# Set PATH, otherwise restart-scripts won't find start-stop-daemon
|
# Set PATH, otherwise restart-scripts won't find start-stop-daemon
|
||||||
#
|
#
|
||||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
|
|
||||||
*/10 * * * * www-data [ -x /usr/bin/awstats_updateall.pl ] && /usr/bin/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl -configdir=/etc/awstats -excludeconf=awstats.model.conf.syscp,awstats.conf
|
*/10 * * * * www-data [ -x /usr/bin/awstats_updateall.pl ] && /usr/bin/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl -configdir=/etc/awstats -excludeconf=awstats.model.conf.froxlor,awstats.conf
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
# Set PATH, otherwise restart-scripts won't find start-stop-daemon
|
# Set PATH, otherwise restart-scripts won't find start-stop-daemon
|
||||||
#
|
#
|
||||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
|
|
||||||
45 0 * * * www-data [ -x /usr/bin/awstats_updateall.pl ] && /usr/bin/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl -configdir=/etc/awstats -excludeconf=awstats.model.conf.syscp,awstats.conf
|
45 0 * * * www-data [ -x /usr/bin/awstats_updateall.pl ] && /usr/bin/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl -configdir=/etc/awstats -excludeconf=awstats.model.conf.froxlor,awstats.conf
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
#
|
||||||
|
# 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 /srv/www/htdocs/froxlor/scripts/cron_tasks.php
|
||||||
|
0 0 * * * root /usr/bin/php5 -q /srv/www/htdocs/froxlor/scripts/cron_traffic.php
|
||||||
|
30 0 * * * root /usr/bin/php5 -q /srv/www/htdocs/froxlor/scripts/cron_ticketarchive.php
|
||||||
|
0 1 * * * root /usr/bin/php5 -q /var/www/htdocs/froxlor/scripts/cron_used_tickets_reset.php
|
||||||
|
*/5 * * * * root /usr/bin/php5 -q /var/www/htdocs/froxlor/scripts/cron_autoresponder.php
|
||||||
|
*/5 * * * * root /usr/bin/php5 -q /var/www/htdocs/froxlor/scripts/cron_apsinstaller.php
|
||||||
|
*/30 * * * * root /usr/bin/php5 -q /var/www/htdocs/froxlor/scripts/cron_apsupdater.php
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
#
|
|
||||||
# Set PATH, otherwise restart-scripts won't find start-stop-daemon
|
|
||||||
#
|
|
||||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
|
||||||
#
|
|
||||||
# Regular cron jobs for the syscp package
|
|
||||||
#
|
|
||||||
*/5 * * * * root /usr/bin/php5 -q /srv/www/htdocs/syscp/scripts/cron_tasks.php
|
|
||||||
0 0 * * * root /usr/bin/php5 -q /srv/www/htdocs/syscp/scripts/cron_traffic.php
|
|
||||||
30 0 * * * root /usr/bin/php5 -q /srv/www/htdocs/syscp/scripts/cron_ticketarchive.php
|
|
||||||
0 1 * * * root /usr/bin/php5 -q /var/www/htdocs/syscp/scripts/cron_used_tickets_reset.php
|
|
||||||
*/5 * * * * root /usr/lib/php5 -q /var/www/htdocs/syscp/scripts/cron_autoresponder.php
|
|
||||||
*/5 * * * * root /usr/lib/php5 -q /var/www/htdocs/syscp/scripts/cron_apsinstaller.php
|
|
||||||
*/30 * * * * root /usr/lib/php5 -q /var/www/htdocs/syscp/scripts/cron_apsupdater.php
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
user = <SQL_UNPRIVILEGED_USER>
|
user = <SQL_UNPRIVILEGED_USER>
|
||||||
password = <SQL_UNPRIVILEGED_PASSWORD>
|
password = <SQL_UNPRIVILEGED_PASSWORD>
|
||||||
dbname = <SQL_DB>
|
dbname = <SQL_DB>
|
||||||
table = mail_virtual
|
table = mail_virtual
|
||||||
select_field = destination
|
select_field = destination
|
||||||
where_field = email
|
where_field = email
|
||||||
additional_conditions = and destination <> '' and destination <> ' '
|
additional_conditions = and TRIM(destination) <> ''
|
||||||
hosts = <SQL_HOST>
|
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