Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d7d32130a | ||
|
|
9babcde3e5 | ||
|
|
9ec76c9fd6 | ||
|
|
61dfeb947f | ||
|
|
6fdf2636fc | ||
|
|
0a38d1ab5f | ||
|
|
7c80dc3d1d | ||
|
|
5ab49e3f50 | ||
|
|
06849133a8 | ||
|
|
4a912e3902 | ||
|
|
bcb95e9b7d | ||
|
|
c97f5f1e29 | ||
|
|
4d289e2a7f | ||
|
|
c491f2c03e |
14
.github/workflows/build-apidocs.yml
vendored
Normal file
14
.github/workflows/build-apidocs.yml
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
name: build-docs
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_docs:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.ORG_GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
gh workflow run --repo Froxlor/Documentation build-docs -f ref=${{github.ref_name}}
|
||||||
12
README.md
12
README.md
@@ -21,7 +21,7 @@ Developed by experienced server administrators, this panel simplifies the effort
|
|||||||
9. Have fun!
|
9. Have fun!
|
||||||
|
|
||||||
### Detailed installation
|
### Detailed installation
|
||||||
https://github.com/Froxlor/Froxlor/wiki/Install-froxlor-from-tarball
|
https://docs.froxlor.org/general/installation/index.html
|
||||||
|
|
||||||
## Help
|
## Help
|
||||||
|
|
||||||
@@ -42,12 +42,12 @@ The community is located on https://forum.froxlor.org/
|
|||||||
|
|
||||||
### Wiki
|
### Wiki
|
||||||
|
|
||||||
More documentation may be found in the froxlor - wiki:
|
More documentation may be found in the froxlor - documentation:
|
||||||
https://github.com/Froxlor/Froxlor/wiki
|
https://docs.froxlor.org/
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
May be found in COPYING
|
May be found in [COPYING](COPYING)
|
||||||
|
|
||||||
## Downloads
|
## Downloads
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ https://files.froxlor.org/releases/froxlor-latest.tar.gz [MD5](https://files.fro
|
|||||||
|
|
||||||
### Debian repository
|
### Debian repository
|
||||||
|
|
||||||
[HowTo](https://github.com/Froxlor/Froxlor/wiki/Install-froxlor-on-debian)
|
[HowTo](https://docs.froxlor.org/general/installation/aptpackage.html)
|
||||||
|
|
||||||
```
|
```
|
||||||
apt-get -y install apt-transport-https lsb-release ca-certificates
|
apt-get -y install apt-transport-https lsb-release ca-certificates
|
||||||
@@ -66,7 +66,7 @@ echo "deb https://deb.froxlor.org/debian $(lsb_release -sc) main" > /etc/apt/sou
|
|||||||
|
|
||||||
### Ubuntu repository
|
### Ubuntu repository
|
||||||
|
|
||||||
[HowTo](https://github.com/Froxlor/Froxlor/wiki/Install-froxlor-on-ubuntu)
|
[HowTo](https://docs.froxlor.org/general/installation/aptpackage.html)
|
||||||
|
|
||||||
```
|
```
|
||||||
apt-get -y install apt-transport-https lsb-release ca-certificates
|
apt-get -y install apt-transport-https lsb-release ca-certificates
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ return array(
|
|||||||
'extras' => $lng['menue']['extras']['extras'],
|
'extras' => $lng['menue']['extras']['extras'],
|
||||||
'extras.directoryprotection' => $lng['menue']['extras']['extras'] . " / " . $lng['menue']['extras']['directoryprotection'],
|
'extras.directoryprotection' => $lng['menue']['extras']['extras'] . " / " . $lng['menue']['extras']['directoryprotection'],
|
||||||
'extras.pathoptions' => $lng['menue']['extras']['extras'] . " / " . $lng['menue']['extras']['pathoptions'],
|
'extras.pathoptions' => $lng['menue']['extras']['extras'] . " / " . $lng['menue']['extras']['pathoptions'],
|
||||||
'extras.logger' => $lng['menue']['extras']['extras'] . " / " . $lng['menue']['logger']['logger'],
|
'extras.logger' => $lng['menue']['extras']['extras'] . " / " . $lng['admin']['loggersystem'],
|
||||||
'extras.backup' => $lng['menue']['extras']['extras'] . " / " . $lng['menue']['extras']['backup'],
|
'extras.backup' => $lng['menue']['extras']['extras'] . " / " . $lng['menue']['extras']['backup'],
|
||||||
'traffic' => $lng['menue']['traffic']['traffic'],
|
'traffic' => $lng['menue']['traffic']['traffic'],
|
||||||
'traffic.http' => $lng['menue']['traffic']['traffic'] . " / HTTP",
|
'traffic.http' => $lng['menue']['traffic']['traffic'] . " / HTTP",
|
||||||
|
|||||||
@@ -640,8 +640,8 @@ if ($page == 'domains' || $page == 'overview') {
|
|||||||
|
|
||||||
// update customer/admin counters
|
// update customer/admin counters
|
||||||
\Froxlor\User::updateCounters(false);
|
\Froxlor\User::updateCounters(false);
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
\Froxlor\System\Cronjob::inserttask('4');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_DNS);
|
||||||
|
|
||||||
$result_str = $result['imported'] . ' / ' . $result['all'] . (! empty($result['note']) ? ' (' . $result['note'] . ')' : '');
|
$result_str = $result['imported'] . ' / ' . $result['all'] . (! empty($result['note']) ? ' (' . $result['note'] . ')' : '');
|
||||||
\Froxlor\UI\Response::standard_success('domain_import_successfully', $result_str, array(
|
\Froxlor\UI\Response::standard_success('domain_import_successfully', $result_str, array(
|
||||||
|
|||||||
@@ -66,11 +66,11 @@ if ($page == 'overview' && $userinfo['change_serversettings'] == '1') {
|
|||||||
'page' => $page
|
'page' => $page
|
||||||
), $_part, $settings_all, $settings_part, $only_enabledisable)) {
|
), $_part, $settings_all, $settings_part, $only_enabledisable)) {
|
||||||
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "rebuild configfiles due to changed setting");
|
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "rebuild configfiles due to changed setting");
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
// Using nameserver, insert a task which rebuilds the server config
|
// Using nameserver, insert a task which rebuilds the server config
|
||||||
\Froxlor\System\Cronjob::inserttask('4');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_DNS);
|
||||||
// cron.d file
|
// cron.d file
|
||||||
\Froxlor\System\Cronjob::inserttask('99');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_CRON);
|
||||||
|
|
||||||
\Froxlor\UI\Response::standard_success('settingssaved', '', array(
|
\Froxlor\UI\Response::standard_success('settingssaved', '', array(
|
||||||
'filename' => $filename,
|
'filename' => $filename,
|
||||||
@@ -146,12 +146,12 @@ if ($page == 'overview' && $userinfo['change_serversettings'] == '1') {
|
|||||||
if (isset($_POST['send']) && $_POST['send'] == 'send') {
|
if (isset($_POST['send']) && $_POST['send'] == 'send') {
|
||||||
|
|
||||||
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "rebuild configfiles");
|
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "rebuild configfiles");
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
\Froxlor\System\Cronjob::inserttask('10');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::CREATE_QUOTA);
|
||||||
// Using nameserver, insert a task which rebuilds the server config
|
// Using nameserver, insert a task which rebuilds the server config
|
||||||
\Froxlor\System\Cronjob::inserttask('4');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_DNS);
|
||||||
// cron.d file
|
// cron.d file
|
||||||
\Froxlor\System\Cronjob::inserttask('99');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_CRON);
|
||||||
|
|
||||||
\Froxlor\UI\Response::standard_success('rebuildingconfigs', '', array(
|
\Froxlor\UI\Response::standard_success('rebuildingconfigs', '', array(
|
||||||
'filename' => 'admin_index.php'
|
'filename' => 'admin_index.php'
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ if ($page == 'overview') {
|
|||||||
eval("echo \"" . \Froxlor\UI\Template::getTemplate('update/update_end') . "\";");
|
eval("echo \"" . \Froxlor\UI\Template::getTemplate('update/update_end') . "\";");
|
||||||
|
|
||||||
\Froxlor\User::updateCounters();
|
\Froxlor\User::updateCounters();
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
@chmod(\Froxlor\Froxlor::getInstallDir() . '/lib/userdata.inc.php', 0440);
|
@chmod(\Froxlor\Froxlor::getInstallDir() . '/lib/userdata.inc.php', 0440);
|
||||||
|
|
||||||
$successful_update = true;
|
$successful_update = true;
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
"docs": "https://github.com/Froxlor/Froxlor/wiki"
|
"docs": "https://github.com/Froxlor/Froxlor/wiki"
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.1",
|
"php": "^7.1 || ^8.0",
|
||||||
"ext-session": "*",
|
"ext-session": "*",
|
||||||
"ext-ctype": "*",
|
"ext-ctype": "*",
|
||||||
"ext-pdo": "*",
|
"ext-pdo": "*",
|
||||||
@@ -52,7 +52,6 @@
|
|||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^9",
|
"phpunit/phpunit": "^9",
|
||||||
"php": ">=7.3",
|
|
||||||
"ext-pcntl": "*",
|
"ext-pcntl": "*",
|
||||||
"phpcompatibility/php-compatibility": "*",
|
"phpcompatibility/php-compatibility": "*",
|
||||||
"squizlabs/php_codesniffer": "*",
|
"squizlabs/php_codesniffer": "*",
|
||||||
|
|||||||
615
composer.lock
generated
615
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -378,6 +378,8 @@ if ($action == '2fa_entercode') {
|
|||||||
$lastscript = "";
|
$lastscript = "";
|
||||||
if (isset($_REQUEST['script']) && $_REQUEST['script'] != "") {
|
if (isset($_REQUEST['script']) && $_REQUEST['script'] != "") {
|
||||||
$lastscript = $_REQUEST['script'];
|
$lastscript = $_REQUEST['script'];
|
||||||
|
$lastscript = str_replace("..", "", $lastscript);
|
||||||
|
$lastscript = htmlspecialchars($lastscript, ENT_QUOTES);
|
||||||
|
|
||||||
if (! file_exists(__DIR__ . "/" . $lastscript)) {
|
if (! file_exists(__DIR__ . "/" . $lastscript)) {
|
||||||
$lastscript = "";
|
$lastscript = "";
|
||||||
|
|||||||
@@ -495,7 +495,6 @@ opcache.load_comments
|
|||||||
opcache.revalidate_path
|
opcache.revalidate_path
|
||||||
opcache.save_comments
|
opcache.save_comments
|
||||||
opcache.use_cwd
|
opcache.use_cwd
|
||||||
opcache.validate_timestamps
|
|
||||||
opcache.fast_shutdown'),
|
opcache.fast_shutdown'),
|
||||||
('phpfpm', 'ini_admin_values', 'cgi.redirect_status_env
|
('phpfpm', 'ini_admin_values', 'cgi.redirect_status_env
|
||||||
date.timezone
|
date.timezone
|
||||||
@@ -519,7 +518,8 @@ opcache.restrict_api
|
|||||||
opcache.revalidate_freq
|
opcache.revalidate_freq
|
||||||
opcache.max_accelerated_files
|
opcache.max_accelerated_files
|
||||||
opcache.memory_consumption
|
opcache.memory_consumption
|
||||||
opcache.interned_strings_buffer'),
|
opcache.interned_strings_buffer
|
||||||
|
opcache.validate_timestamps'),
|
||||||
('nginx', 'fastcgiparams', '/etc/nginx/fastcgi_params'),
|
('nginx', 'fastcgiparams', '/etc/nginx/fastcgi_params'),
|
||||||
('system', 'lastaccountnumber', '0'),
|
('system', 'lastaccountnumber', '0'),
|
||||||
('system', 'lastguid', '9999'),
|
('system', 'lastguid', '9999'),
|
||||||
@@ -723,7 +723,7 @@ opcache.interned_strings_buffer'),
|
|||||||
('panel', 'logo_image_login', ''),
|
('panel', 'logo_image_login', ''),
|
||||||
('panel', 'logo_overridetheme', '0'),
|
('panel', 'logo_overridetheme', '0'),
|
||||||
('panel', 'logo_overridecustom', '0'),
|
('panel', 'logo_overridecustom', '0'),
|
||||||
('panel', 'version', '0.10.32'),
|
('panel', 'version', '0.10.33'),
|
||||||
('panel', 'db_version', '202112310');
|
('panel', 'db_version', '202112310');
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
31
install/scripts/php-sessionclean.php
Executable file
31
install/scripts/php-sessionclean.php
Executable file
@@ -0,0 +1,31 @@
|
|||||||
|
#!/usr/bin/php
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file is part of the Froxlor project.
|
||||||
|
* Copyright (c) 2022 the Froxlor Team (see authors).
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the COPYING
|
||||||
|
* file that was distributed with this source code. You can also view the
|
||||||
|
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
*
|
||||||
|
* @copyright (c) the authors
|
||||||
|
* @author Froxlor team <team@froxlor.org> (2018-)
|
||||||
|
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
* @package Cron
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Check if we're in the CLI
|
||||||
|
if (@php_sapi_name() !== 'cli') {
|
||||||
|
die('This script will only work in the shell.');
|
||||||
|
}
|
||||||
|
|
||||||
|
require dirname(dirname(__DIR__)) . '/vendor/autoload.php';
|
||||||
|
|
||||||
|
// give control to command line handler
|
||||||
|
try {
|
||||||
|
\Froxlor\Cli\PhpSessioncleanCmd::processParameters($argc, $argv);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
\Froxlor\Cli\PhpSessioncleanCmd::printerr($e->getMessage());
|
||||||
|
}
|
||||||
@@ -843,7 +843,7 @@ if (\Froxlor\Froxlor::isDatabaseVersion('202106270')) {
|
|||||||
throw new \Exception("img directory does not exist and cannot be created");
|
throw new \Exception("img directory does not exist and cannot be created");
|
||||||
}
|
}
|
||||||
if (!is_writable($path)) {
|
if (!is_writable($path)) {
|
||||||
if (!chmod($path, '0775')) {
|
if (!chmod($path, 0775)) {
|
||||||
throw new \Exception("Cannot write to img directory");
|
throw new \Exception("Cannot write to img directory");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -965,3 +965,8 @@ if (\Froxlor\Froxlor::isFroxlorVersion('0.10.31')) {
|
|||||||
showUpdateStep("Updating from 0.10.31 to 0.10.32", false);
|
showUpdateStep("Updating from 0.10.31 to 0.10.32", false);
|
||||||
\Froxlor\Froxlor::updateToVersion('0.10.32');
|
\Froxlor\Froxlor::updateToVersion('0.10.32');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (\Froxlor\Froxlor::isFroxlorVersion('0.10.32')) {
|
||||||
|
showUpdateStep("Updating from 0.10.32 to 0.10.33", false);
|
||||||
|
\Froxlor\Froxlor::updateToVersion('0.10.33');
|
||||||
|
}
|
||||||
|
|||||||
@@ -323,7 +323,7 @@ class Certificates extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resou
|
|||||||
));
|
));
|
||||||
// trigger removing of certificate from acme.sh if let's encrypt
|
// trigger removing of certificate from acme.sh if let's encrypt
|
||||||
if ($chk['letsencrypt'] == '1') {
|
if ($chk['letsencrypt'] == '1') {
|
||||||
\Froxlor\System\Cronjob::inserttask('12', $chk['domain']);
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::DELETE_DOMAIN_SSL, $chk['domain']);
|
||||||
}
|
}
|
||||||
$this->logger()->logAction($this->isAdmin() ? \Froxlor\FroxlorLogger::ADM_ACTION : \Froxlor\FroxlorLogger::USR_ACTION, LOG_INFO, "[API] removed ssl-certificate for '" . $chk['domain'] . "'");
|
$this->logger()->logAction($this->isAdmin() ? \Froxlor\FroxlorLogger::ADM_ACTION : \Froxlor\FroxlorLogger::USR_ACTION, LOG_INFO, "[API] removed ssl-certificate for '" . $chk['domain'] . "'");
|
||||||
return $this->response(200, "successful", $result);
|
return $this->response(200, "successful", $result);
|
||||||
@@ -421,7 +421,7 @@ class Certificates extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resou
|
|||||||
);
|
);
|
||||||
Database::pexecute($stmt, $params, true, true);
|
Database::pexecute($stmt, $params, true, true);
|
||||||
// insert task to re-generate webserver-configs (#1260)
|
// insert task to re-generate webserver-configs (#1260)
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ class Cronjobs extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceE
|
|||||||
), true, true);
|
), true, true);
|
||||||
|
|
||||||
// insert task to re-generate the cron.d-file
|
// insert task to re-generate the cron.d-file
|
||||||
\Froxlor\System\Cronjob::inserttask('99');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_CRON);
|
||||||
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] cronjob with description '" . $result['module'] . '/' . $result['cronfile'] . "' has been updated by '" . $this->getUserDetail('loginname') . "'");
|
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] cronjob with description '" . $result['module'] . '/' . $result['cronfile'] . "' has been updated by '" . $this->getUserDetail('loginname') . "'");
|
||||||
$result = $this->apiCall('Cronjobs.get', array(
|
$result = $this->apiCall('Cronjobs.get', array(
|
||||||
'id' => $id
|
'id' => $id
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ class CustomerBackups extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Re
|
|||||||
'backup_web' => $backup_web
|
'backup_web' => $backup_web
|
||||||
);
|
);
|
||||||
// schedule backup job
|
// schedule backup job
|
||||||
\Froxlor\System\Cronjob::inserttask('20', $task_data);
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::CREATE_CUSTOMER_BACKUP, $task_data);
|
||||||
|
|
||||||
$this->logger()->logAction($this->isAdmin() ? \Froxlor\FroxlorLogger::ADM_ACTION : \Froxlor\FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] added customer-backup job for '" . $customer['loginname'] . "'. Target directory: " . $userpath);
|
$this->logger()->logAction($this->isAdmin() ? \Froxlor\FroxlorLogger::ADM_ACTION : \Froxlor\FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] added customer-backup job for '" . $customer['loginname'] . "'. Target directory: " . $userpath);
|
||||||
return $this->response(200, "successful", $task_data);
|
return $this->response(200, "successful", $task_data);
|
||||||
|
|||||||
@@ -645,10 +645,10 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource
|
|||||||
unset($ins_data);
|
unset($ins_data);
|
||||||
|
|
||||||
// insert task to create homedir etc.
|
// insert task to create homedir etc.
|
||||||
\Froxlor\System\Cronjob::inserttask('2', $loginname, $guid, $guid, $store_defaultindex);
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::CREATE_HOME, $loginname, $guid, $guid, $store_defaultindex);
|
||||||
|
|
||||||
// Using filesystem - quota, insert a task which cleans the filesystem - quota
|
// Using filesystem - quota, insert a task which cleans the filesystem - quota
|
||||||
\Froxlor\System\Cronjob::inserttask('10');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::CREATE_QUOTA);
|
||||||
|
|
||||||
// Add htpasswd for the stats-pages
|
// Add htpasswd for the stats-pages
|
||||||
$htpasswdPassword = \Froxlor\System\Crypt::makeCryptPassword($password, true);
|
$htpasswdPassword = \Froxlor\System\Crypt::makeCryptPassword($password, true);
|
||||||
@@ -674,7 +674,7 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource
|
|||||||
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] automatically added " . $stats_folder . " htpasswd for user '" . $loginname . "'");
|
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] automatically added " . $stats_folder . " htpasswd for user '" . $loginname . "'");
|
||||||
Database::pexecute($ins_stmt, $ins_data, true, true);
|
Database::pexecute($ins_stmt, $ins_data, true, true);
|
||||||
|
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
|
|
||||||
// add default FTP-User
|
// add default FTP-User
|
||||||
// also, add froxlor-local user to ftp-group (if exists!) to
|
// also, add froxlor-local user to ftp-group (if exists!) to
|
||||||
@@ -739,7 +739,7 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource
|
|||||||
'customerid' => $customerid
|
'customerid' => $customerid
|
||||||
), true, true);
|
), true, true);
|
||||||
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] automatically added standardsubdomain for user '" . $loginname . "'");
|
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] automatically added standardsubdomain for user '" . $loginname . "'");
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1088,7 +1088,7 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource
|
|||||||
'customerid' => $result['customerid']
|
'customerid' => $result['customerid']
|
||||||
), true, true);
|
), true, true);
|
||||||
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] automatically added standardsubdomain for user '" . $result['loginname'] . "'");
|
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] automatically added standardsubdomain for user '" . $result['loginname'] . "'");
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1102,11 +1102,11 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource
|
|||||||
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_ERR, "[API] Unable to delete standard-subdomain: " . $e->getMessage());
|
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_ERR, "[API] Unable to delete standard-subdomain: " . $e->getMessage());
|
||||||
}
|
}
|
||||||
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] automatically deleted standardsubdomain for user '" . $result['loginname'] . "'");
|
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] automatically deleted standardsubdomain for user '" . $result['loginname'] . "'");
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($phpenabled != $result['phpenabled'] || $perlenabled != $result['perlenabled'] || $email != $result['email']) {
|
if ($phpenabled != $result['phpenabled'] || $perlenabled != $result['perlenabled'] || $email != $result['email']) {
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
}
|
}
|
||||||
|
|
||||||
// activate/deactivate customer services
|
// activate/deactivate customer services
|
||||||
@@ -1192,7 +1192,7 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource
|
|||||||
), true, true);
|
), true, true);
|
||||||
|
|
||||||
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] " . ($deactivated ? 'deactivated' : 'reactivated') . " user '" . $result['loginname'] . "'");
|
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] " . ($deactivated ? 'deactivated' : 'reactivated') . " user '" . $result['loginname'] . "'");
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disable or enable POP3 Login for customers Mail Accounts
|
// Disable or enable POP3 Login for customers Mail Accounts
|
||||||
@@ -1304,7 +1304,7 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource
|
|||||||
|
|
||||||
if ($this->isAdmin()) {
|
if ($this->isAdmin()) {
|
||||||
// Using filesystem - quota, insert a task which cleans the filesystem - quota
|
// Using filesystem - quota, insert a task which cleans the filesystem - quota
|
||||||
\Froxlor\System\Cronjob::inserttask('10');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::CREATE_QUOTA);
|
||||||
|
|
||||||
$admin_update_query = "UPDATE `" . TABLE_PANEL_ADMINS . "` SET `customers_used` = `customers_used` ";
|
$admin_update_query = "UPDATE `" . TABLE_PANEL_ADMINS . "` SET `customers_used` = `customers_used` ";
|
||||||
|
|
||||||
@@ -1512,9 +1512,9 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource
|
|||||||
'did' => $row['id']
|
'did' => $row['id']
|
||||||
), true, true);
|
), true, true);
|
||||||
// remove domains DNS from powerDNS if used, #581
|
// remove domains DNS from powerDNS if used, #581
|
||||||
\Froxlor\System\Cronjob::inserttask('11', $row['domain']);
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::DELETE_DOMAIN_PDNS, $row['domain']);
|
||||||
// remove domain from acme.sh / lets encrypt if used
|
// remove domain from acme.sh / lets encrypt if used
|
||||||
\Froxlor\System\Cronjob::inserttask('12', $row['domain']);
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::DELETE_DOMAIN_SSL, $row['domain']);
|
||||||
}
|
}
|
||||||
// remove customer domains
|
// remove customer domains
|
||||||
$stmt = Database::prepare("DELETE FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid` = :id");
|
$stmt = Database::prepare("DELETE FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid` = :id");
|
||||||
@@ -1643,18 +1643,18 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource
|
|||||||
}
|
}
|
||||||
|
|
||||||
// rebuild configs
|
// rebuild configs
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
|
|
||||||
// Using nameserver, insert a task which rebuilds the server config
|
// Using nameserver, insert a task which rebuilds the server config
|
||||||
\Froxlor\System\Cronjob::inserttask('4');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_DNS);
|
||||||
|
|
||||||
if ($delete_userfiles == 1) {
|
if ($delete_userfiles == 1) {
|
||||||
// insert task to remove the customers files from the filesystem
|
// insert task to remove the customers files from the filesystem
|
||||||
\Froxlor\System\Cronjob::inserttask('6', $result['loginname']);
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::DELETE_CUSTOMER_FILES, $result['loginname']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Using filesystem - quota, insert a task which cleans the filesystem - quota
|
// Using filesystem - quota, insert a task which cleans the filesystem - quota
|
||||||
\Froxlor\System\Cronjob::inserttask('10');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::CREATE_QUOTA);
|
||||||
|
|
||||||
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_WARNING, "[API] deleted customer '" . $result['loginname'] . "'");
|
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_WARNING, "[API] deleted customer '" . $result['loginname'] . "'");
|
||||||
return $this->response(200, "successful", $result);
|
return $this->response(200, "successful", $result);
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ class DirOptions extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
|||||||
Database::pexecute($stmt, $params, true, true);
|
Database::pexecute($stmt, $params, true, true);
|
||||||
$id = Database::lastInsertId();
|
$id = Database::lastInsertId();
|
||||||
$this->logger()->logAction($this->isAdmin() ? \Froxlor\FroxlorLogger::ADM_ACTION : \Froxlor\FroxlorLogger::USR_ACTION, LOG_INFO, "[API] added directory-option for '" . $userpath . "'");
|
$this->logger()->logAction($this->isAdmin() ? \Froxlor\FroxlorLogger::ADM_ACTION : \Froxlor\FroxlorLogger::USR_ACTION, LOG_INFO, "[API] added directory-option for '" . $userpath . "'");
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
|
|
||||||
$result = $this->apiCall('DirOptions.get', array(
|
$result = $this->apiCall('DirOptions.get', array(
|
||||||
'id' => $id
|
'id' => $id
|
||||||
@@ -248,7 +248,7 @@ class DirOptions extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (($options_indexes != $result['options_indexes']) || ($error404path != $result['error404path']) || ($error403path != $result['error403path']) || ($error500path != $result['error500path']) || ($options_cgi != $result['options_cgi'])) {
|
if (($options_indexes != $result['options_indexes']) || ($error404path != $result['error404path']) || ($error403path != $result['error403path']) || ($error500path != $result['error500path']) || ($options_cgi != $result['options_cgi'])) {
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
$stmt = Database::prepare("
|
$stmt = Database::prepare("
|
||||||
UPDATE `" . TABLE_PANEL_HTACCESS . "`
|
UPDATE `" . TABLE_PANEL_HTACCESS . "`
|
||||||
SET `options_indexes` = :options_indexes,
|
SET `options_indexes` = :options_indexes,
|
||||||
@@ -413,7 +413,7 @@ class DirOptions extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
|||||||
"id" => $id
|
"id" => $id
|
||||||
), true, true);
|
), true, true);
|
||||||
$this->logger()->logAction($this->isAdmin() ? \Froxlor\FroxlorLogger::ADM_ACTION : \Froxlor\FroxlorLogger::USR_ACTION, LOG_INFO, "[API] deleted directory-option for '" . str_replace($customer_data['documentroot'], '/', $result['path']) . "'");
|
$this->logger()->logAction($this->isAdmin() ? \Froxlor\FroxlorLogger::ADM_ACTION : \Froxlor\FroxlorLogger::USR_ACTION, LOG_INFO, "[API] deleted directory-option for '" . str_replace($customer_data['documentroot'], '/', $result['path']) . "'");
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
return $this->response(200, "successful", $result);
|
return $this->response(200, "successful", $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ class DirProtections extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Res
|
|||||||
Database::pexecute($stmt, $params, true, true);
|
Database::pexecute($stmt, $params, true, true);
|
||||||
$id = Database::lastInsertId();
|
$id = Database::lastInsertId();
|
||||||
$this->logger()->logAction($this->isAdmin() ? \Froxlor\FroxlorLogger::ADM_ACTION : \Froxlor\FroxlorLogger::USR_ACTION, LOG_INFO, "[API] added directory-protection for '" . $username . " (" . $path . ")'");
|
$this->logger()->logAction($this->isAdmin() ? \Froxlor\FroxlorLogger::ADM_ACTION : \Froxlor\FroxlorLogger::USR_ACTION, LOG_INFO, "[API] added directory-protection for '" . $username . " (" . $path . ")'");
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
|
|
||||||
$result = $this->apiCall('DirProtections.get', array(
|
$result = $this->apiCall('DirProtections.get', array(
|
||||||
'id' => $id
|
'id' => $id
|
||||||
@@ -251,7 +251,7 @@ class DirProtections extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Res
|
|||||||
UPDATE `" . TABLE_PANEL_HTPASSWDS . "` SET " . $upd_query . " WHERE `id` = :id AND `customerid`= :cid
|
UPDATE `" . TABLE_PANEL_HTPASSWDS . "` SET " . $upd_query . " WHERE `id` = :id AND `customerid`= :cid
|
||||||
");
|
");
|
||||||
Database::pexecute($upd_stmt, $upd_params, true, true);
|
Database::pexecute($upd_stmt, $upd_params, true, true);
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->logger()->logAction($this->isAdmin() ? \Froxlor\FroxlorLogger::ADM_ACTION : \Froxlor\FroxlorLogger::USR_ACTION, LOG_INFO, "[API] updated directory-protection '" . $result['username'] . " (" . $result['path'] . ")'");
|
$this->logger()->logAction($this->isAdmin() ? \Froxlor\FroxlorLogger::ADM_ACTION : \Froxlor\FroxlorLogger::USR_ACTION, LOG_INFO, "[API] updated directory-protection '" . $result['username'] . " (" . $result['path'] . ")'");
|
||||||
@@ -385,7 +385,7 @@ class DirProtections extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Res
|
|||||||
));
|
));
|
||||||
|
|
||||||
$this->logger()->logAction($this->isAdmin() ? \Froxlor\FroxlorLogger::ADM_ACTION : \Froxlor\FroxlorLogger::USR_ACTION, LOG_INFO, "[API] deleted htpasswd for '" . $result['username'] . " (" . $result['path'] . ")'");
|
$this->logger()->logAction($this->isAdmin() ? \Froxlor\FroxlorLogger::ADM_ACTION : \Froxlor\FroxlorLogger::USR_ACTION, LOG_INFO, "[API] deleted htpasswd for '" . $result['username'] . " (" . $result['path'] . ")'");
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
return $this->response(200, "successful", $result);
|
return $this->response(200, "successful", $result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -336,7 +336,7 @@ class DomainZones extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour
|
|||||||
$dom_entries[] = $new_entry;
|
$dom_entries[] = $new_entry;
|
||||||
|
|
||||||
// re-generate bind configs
|
// re-generate bind configs
|
||||||
\Froxlor\System\Cronjob::inserttask('4');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_DNS);
|
||||||
|
|
||||||
$result = $this->apiCall('DomainZones.get', array(
|
$result = $this->apiCall('DomainZones.get', array(
|
||||||
'id' => $id
|
'id' => $id
|
||||||
@@ -542,7 +542,7 @@ class DomainZones extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour
|
|||||||
), true, true);
|
), true, true);
|
||||||
if ($del_stmt->rowCount() > 0) {
|
if ($del_stmt->rowCount() > 0) {
|
||||||
// re-generate bind configs
|
// re-generate bind configs
|
||||||
\Froxlor\System\Cronjob::inserttask('4');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_DNS);
|
||||||
return $this->response(200, "successful", true);
|
return $this->response(200, "successful", true);
|
||||||
}
|
}
|
||||||
return $this->response(304, "successful", true);
|
return $this->response(304, "successful", true);
|
||||||
|
|||||||
@@ -857,9 +857,9 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
|
|||||||
|
|
||||||
\Froxlor\Domain\Domain::triggerLetsEncryptCSRForAliasDestinationDomain($aliasdomain, $this->logger());
|
\Froxlor\Domain\Domain::triggerLetsEncryptCSRForAliasDestinationDomain($aliasdomain, $this->logger());
|
||||||
|
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
// Using nameserver, insert a task which rebuilds the server config
|
// Using nameserver, insert a task which rebuilds the server config
|
||||||
\Froxlor\System\Cronjob::inserttask('4');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_DNS);
|
||||||
|
|
||||||
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_WARNING, "[API] added domain '" . $domain . "'");
|
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_WARNING, "[API] added domain '" . $domain . "'");
|
||||||
|
|
||||||
@@ -1465,7 +1465,7 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
|
|||||||
$iswildcarddomain = ($serveraliasoption == '0') ? '1' : '0';
|
$iswildcarddomain = ($serveraliasoption == '0') ? '1' : '0';
|
||||||
|
|
||||||
if ($documentroot != $result['documentroot'] || $ssl_redirect != $result['ssl_redirect'] || $wwwserveralias != $result['wwwserveralias'] || $iswildcarddomain != $result['iswildcarddomain'] || $phpenabled != $result['phpenabled'] || $openbasedir != $result['openbasedir'] || $phpsettingid != $result['phpsettingid'] || $mod_fcgid_starter != $result['mod_fcgid_starter'] || $mod_fcgid_maxrequests != $result['mod_fcgid_maxrequests'] || $specialsettings != $result['specialsettings'] || $ssl_specialsettings != $result['ssl_specialsettings'] || $notryfiles != $result['notryfiles'] || $writeaccesslog != $result['writeaccesslog'] || $writeerrorlog != $result['writeerrorlog'] || $aliasdomain != $result['aliasdomain'] || $issubof != $result['ismainbutsubto'] || $email_only != $result['email_only'] || ($speciallogfile != $result['speciallogfile'] && $speciallogverified == '1') || $letsencrypt != $result['letsencrypt'] || $http2 != $result['http2'] || $hsts_maxage != $result['hsts'] || $hsts_sub != $result['hsts_sub'] || $hsts_preload != $result['hsts_preload'] || $ocsp_stapling != $result['ocsp_stapling']) {
|
if ($documentroot != $result['documentroot'] || $ssl_redirect != $result['ssl_redirect'] || $wwwserveralias != $result['wwwserveralias'] || $iswildcarddomain != $result['iswildcarddomain'] || $phpenabled != $result['phpenabled'] || $openbasedir != $result['openbasedir'] || $phpsettingid != $result['phpsettingid'] || $mod_fcgid_starter != $result['mod_fcgid_starter'] || $mod_fcgid_maxrequests != $result['mod_fcgid_maxrequests'] || $specialsettings != $result['specialsettings'] || $ssl_specialsettings != $result['ssl_specialsettings'] || $notryfiles != $result['notryfiles'] || $writeaccesslog != $result['writeaccesslog'] || $writeerrorlog != $result['writeerrorlog'] || $aliasdomain != $result['aliasdomain'] || $issubof != $result['ismainbutsubto'] || $email_only != $result['email_only'] || ($speciallogfile != $result['speciallogfile'] && $speciallogverified == '1') || $letsencrypt != $result['letsencrypt'] || $http2 != $result['http2'] || $hsts_maxage != $result['hsts'] || $hsts_sub != $result['hsts_sub'] || $hsts_preload != $result['hsts_preload'] || $ocsp_stapling != $result['ocsp_stapling']) {
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($speciallogfile != $result['speciallogfile'] && $speciallogverified != '1') {
|
if ($speciallogfile != $result['speciallogfile'] && $speciallogverified != '1') {
|
||||||
@@ -1473,11 +1473,11 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($isbinddomain != $result['isbinddomain'] || $zonefile != $result['zonefile'] || $dkim != $result['dkim'] || $isemaildomain != $result['isemaildomain']) {
|
if ($isbinddomain != $result['isbinddomain'] || $zonefile != $result['zonefile'] || $dkim != $result['dkim'] || $isemaildomain != $result['isemaildomain']) {
|
||||||
\Froxlor\System\Cronjob::inserttask('4');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_DNS);
|
||||||
}
|
}
|
||||||
// check whether nameserver has been disabled, #581
|
// check whether nameserver has been disabled, #581
|
||||||
if ($isbinddomain != $result['isbinddomain'] && $isbinddomain == 0) {
|
if ($isbinddomain != $result['isbinddomain'] && $isbinddomain == 0) {
|
||||||
\Froxlor\System\Cronjob::inserttask('11', $result['domain']);
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::DELETE_DOMAIN_PDNS, $result['domain']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($isemaildomain == '0' && $result['isemaildomain'] == '1') {
|
if ($isemaildomain == '0' && $result['isemaildomain'] == '1') {
|
||||||
@@ -1506,7 +1506,7 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
|
|||||||
'id' => $id
|
'id' => $id
|
||||||
), true, true);
|
), true, true);
|
||||||
// remove domain from acme.sh / lets encrypt if used
|
// remove domain from acme.sh / lets encrypt if used
|
||||||
\Froxlor\System\Cronjob::inserttask('12', $result['domain']);
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::DELETE_DOMAIN_SSL, $result['domain']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$updatechildren = '';
|
$updatechildren = '';
|
||||||
@@ -1984,16 +1984,16 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
|
|||||||
\Froxlor\Domain\Domain::triggerLetsEncryptCSRForAliasDestinationDomain($result['aliasdomain'], $this->logger());
|
\Froxlor\Domain\Domain::triggerLetsEncryptCSRForAliasDestinationDomain($result['aliasdomain'], $this->logger());
|
||||||
|
|
||||||
// remove domains DNS from powerDNS if used, #581
|
// remove domains DNS from powerDNS if used, #581
|
||||||
\Froxlor\System\Cronjob::inserttask('11', $result['domain']);
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::DELETE_DOMAIN_PDNS, $result['domain']);
|
||||||
|
|
||||||
// remove domain from acme.sh / lets encrypt if used
|
// remove domain from acme.sh / lets encrypt if used
|
||||||
\Froxlor\System\Cronjob::inserttask('12', $result['domain']);
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::DELETE_DOMAIN_SSL, $result['domain']);
|
||||||
|
|
||||||
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] deleted domain/subdomains (#" . $result['id'] . ")");
|
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] deleted domain/subdomains (#" . $result['id'] . ")");
|
||||||
\Froxlor\User::updateCounters();
|
\Froxlor\User::updateCounters();
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
// Using nameserver, insert a task which rebuilds the server config
|
// Using nameserver, insert a task which rebuilds the server config
|
||||||
\Froxlor\System\Cronjob::inserttask('4');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_DNS);
|
||||||
return $this->response(200, "successful", $result);
|
return $this->response(200, "successful", $result);
|
||||||
}
|
}
|
||||||
throw new \Exception("Not allowed to execute given command.", 403);
|
throw new \Exception("Not allowed to execute given command.", 403);
|
||||||
|
|||||||
@@ -499,7 +499,7 @@ class EmailAccounts extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Reso
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($delete_userfiles) {
|
if ($delete_userfiles) {
|
||||||
\Froxlor\System\Cronjob::inserttask('7', $customer['loginname'], $result['email_full']);
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::DELETE_EMAIL_DATA, $customer['loginname'], $result['email_full']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// decrease usage for customer
|
// decrease usage for customer
|
||||||
|
|||||||
@@ -178,9 +178,9 @@ class FpmDaemons extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
|||||||
$custom_config = $this->getParam('custom_config', true, '');
|
$custom_config = $this->getParam('custom_config', true, '');
|
||||||
|
|
||||||
// validation
|
// validation
|
||||||
$description = \Froxlor\Validate\Validate::validate($description, 'description', '', '', array(), true);
|
$description = \Froxlor\Validate\Validate::validate($description, 'description', \Froxlor\Validate\Validate::REGEX_DESC_TEXT, '', array(), true);
|
||||||
$reload_cmd = \Froxlor\Validate\Validate::validate($reload_cmd, 'reload_cmd', '', '', array(), true);
|
$reload_cmd = \Froxlor\Validate\Validate::validate($reload_cmd, 'reload_cmd', '', '', array(), true);
|
||||||
$config_dir = \Froxlor\Validate\Validate::validate($config_dir, 'config_dir', '', '', array(), true);
|
$config_dir = \Froxlor\Validate\Validate::validate($config_dir, 'config_dir', \Froxlor\Validate\Validate::REGEX_DIR, '', array(), true);
|
||||||
if (! in_array($pmanager, array(
|
if (! in_array($pmanager, array(
|
||||||
'static',
|
'static',
|
||||||
'dynamic',
|
'dynamic',
|
||||||
@@ -229,7 +229,7 @@ class FpmDaemons extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
|||||||
Database::pexecute($ins_stmt, $ins_data);
|
Database::pexecute($ins_stmt, $ins_data);
|
||||||
$id = Database::lastInsertId();
|
$id = Database::lastInsertId();
|
||||||
|
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] fpm-daemon with description '" . $description . "' has been created by '" . $this->getUserDetail('loginname') . "'");
|
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] fpm-daemon with description '" . $description . "' has been created by '" . $this->getUserDetail('loginname') . "'");
|
||||||
$result = $this->apiCall('FpmDaemons.get', array(
|
$result = $this->apiCall('FpmDaemons.get', array(
|
||||||
'id' => $id
|
'id' => $id
|
||||||
@@ -299,9 +299,9 @@ class FpmDaemons extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
|||||||
$custom_config = $this->getParam('custom_config', true, $result['custom_config']);
|
$custom_config = $this->getParam('custom_config', true, $result['custom_config']);
|
||||||
|
|
||||||
// validation
|
// validation
|
||||||
$description = \Froxlor\Validate\Validate::validate($description, 'description', '', '', array(), true);
|
$description = \Froxlor\Validate\Validate::validate($description, 'description', \Froxlor\Validate\Validate::REGEX_DESC_TEXT, '', array(), true);
|
||||||
$reload_cmd = \Froxlor\Validate\Validate::validate($reload_cmd, 'reload_cmd', '', '', array(), true);
|
$reload_cmd = \Froxlor\Validate\Validate::validate($reload_cmd, 'reload_cmd', '', '', array(), true);
|
||||||
$config_dir = \Froxlor\Validate\Validate::validate($config_dir, 'config_dir', '', '', array(), true);
|
$config_dir = \Froxlor\Validate\Validate::validate($config_dir, 'config_dir', \Froxlor\Validate\Validate::REGEX_DIR, '', array(), true);
|
||||||
if (! in_array($pmanager, array(
|
if (! in_array($pmanager, array(
|
||||||
'static',
|
'static',
|
||||||
'dynamic',
|
'dynamic',
|
||||||
@@ -351,7 +351,7 @@ class FpmDaemons extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
|||||||
);
|
);
|
||||||
Database::pexecute($upd_stmt, $upd_data, true, true);
|
Database::pexecute($upd_stmt, $upd_data, true, true);
|
||||||
|
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] fpm-daemon with description '" . $description . "' has been updated by '" . $this->getUserDetail('loginname') . "'");
|
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] fpm-daemon with description '" . $description . "' has been updated by '" . $this->getUserDetail('loginname') . "'");
|
||||||
$result = $this->apiCall('FpmDaemons.get', array(
|
$result = $this->apiCall('FpmDaemons.get', array(
|
||||||
'id' => $id
|
'id' => $id
|
||||||
@@ -400,7 +400,7 @@ class FpmDaemons extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
|||||||
'id' => $id
|
'id' => $id
|
||||||
), true, true);
|
), true, true);
|
||||||
|
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] fpm-daemon setting '" . $result['description'] . "' has been deleted by '" . $this->getUserDetail('loginname') . "'");
|
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] fpm-daemon setting '" . $result['description'] . "' has been deleted by '" . $this->getUserDetail('loginname') . "'");
|
||||||
return $this->response(200, "successful", $result);
|
return $this->response(200, "successful", $result);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,12 +123,12 @@ class Froxlor extends \Froxlor\Api\ApiCommand
|
|||||||
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, "User " . $this->getUserDetail('loginname') . " imported settings");
|
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, "User " . $this->getUserDetail('loginname') . " imported settings");
|
||||||
try {
|
try {
|
||||||
\Froxlor\SImExporter::import($json_str);
|
\Froxlor\SImExporter::import($json_str);
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
\Froxlor\System\Cronjob::inserttask('10');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::CREATE_QUOTA);
|
||||||
// Using nameserver, insert a task which rebuilds the server config
|
// Using nameserver, insert a task which rebuilds the server config
|
||||||
\Froxlor\System\Cronjob::inserttask('4');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_DNS);
|
||||||
// cron.d file
|
// cron.d file
|
||||||
\Froxlor\System\Cronjob::inserttask('99');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_CRON);
|
||||||
return $this->response(200, "successful", true);
|
return $this->response(200, "successful", true);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
throw new \Exception($e->getMessage(), 406);
|
throw new \Exception($e->getMessage(), 406);
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ class Ftps extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEntit
|
|||||||
// validation
|
// validation
|
||||||
$password = \Froxlor\Validate\Validate::validate($password, 'password', '', '', array(), true);
|
$password = \Froxlor\Validate\Validate::validate($password, 'password', '', '', array(), true);
|
||||||
$password = \Froxlor\System\Crypt::validatePassword($password, true);
|
$password = \Froxlor\System\Crypt::validatePassword($password, true);
|
||||||
$description = \Froxlor\Validate\Validate::validate(trim($description), 'description', '', '', array(), true);
|
$description = \Froxlor\Validate\Validate::validate(trim($description), 'description', \Froxlor\Validate\Validate::REGEX_DESC_TEXT, '', array(), true);
|
||||||
|
|
||||||
if (Settings::Get('system.allow_customer_shell') == '1') {
|
if (Settings::Get('system.allow_customer_shell') == '1') {
|
||||||
$shell = \Froxlor\Validate\Validate::validate(trim($shell), 'shell', '', '', array(), true);
|
$shell = \Froxlor\Validate\Validate::validate(trim($shell), 'shell', '', '', array(), true);
|
||||||
@@ -234,7 +234,7 @@ class Ftps extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEntit
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->logger()->logAction($this->isAdmin() ? \Froxlor\FroxlorLogger::ADM_ACTION : \Froxlor\FroxlorLogger::USR_ACTION, LOG_INFO, "[API] added ftp-account '" . $username . " (" . $path . ")'");
|
$this->logger()->logAction($this->isAdmin() ? \Froxlor\FroxlorLogger::ADM_ACTION : \Froxlor\FroxlorLogger::USR_ACTION, LOG_INFO, "[API] added ftp-account '" . $username . " (" . $path . ")'");
|
||||||
\Froxlor\System\Cronjob::inserttask(5);
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::CREATE_FTP);
|
||||||
|
|
||||||
if ($sendinfomail == 1) {
|
if ($sendinfomail == 1) {
|
||||||
$replace_arr = array(
|
$replace_arr = array(
|
||||||
@@ -396,7 +396,7 @@ class Ftps extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEntit
|
|||||||
|
|
||||||
// validation
|
// validation
|
||||||
$password = \Froxlor\Validate\Validate::validate($password, 'password', '', '', array(), true);
|
$password = \Froxlor\Validate\Validate::validate($password, 'password', '', '', array(), true);
|
||||||
$description = \Froxlor\Validate\Validate::validate(trim($description), 'description', '', '', array(), true);
|
$description = \Froxlor\Validate\Validate::validate(trim($description), 'description', \Froxlor\Validate\Validate::REGEX_DESC_TEXT, '', array(), true);
|
||||||
|
|
||||||
if (Settings::Get('system.allow_customer_shell') == '1') {
|
if (Settings::Get('system.allow_customer_shell') == '1') {
|
||||||
$shell = \Froxlor\Validate\Validate::validate(trim($shell), 'shell', '', '', array(), true);
|
$shell = \Froxlor\Validate\Validate::validate(trim($shell), 'shell', '', '', array(), true);
|
||||||
@@ -450,7 +450,7 @@ class Ftps extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEntit
|
|||||||
}
|
}
|
||||||
// it's the task for "new ftp" but that will
|
// it's the task for "new ftp" but that will
|
||||||
// create all directories and correct their permissions
|
// create all directories and correct their permissions
|
||||||
\Froxlor\System\Cronjob::inserttask(5);
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::CREATE_FTP);
|
||||||
|
|
||||||
$stmt = Database::prepare("
|
$stmt = Database::prepare("
|
||||||
UPDATE `" . TABLE_FTP_USERS . "`
|
UPDATE `" . TABLE_FTP_USERS . "`
|
||||||
@@ -628,11 +628,11 @@ class Ftps extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEntit
|
|||||||
|
|
||||||
// refs #293
|
// refs #293
|
||||||
if ($delete_userfiles == 1) {
|
if ($delete_userfiles == 1) {
|
||||||
\Froxlor\System\Cronjob::inserttask('8', $customer_data['loginname'], $result['homedir']);
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::DELETE_FTP_DATA, $customer_data['loginname'], $result['homedir']);
|
||||||
} else {
|
} else {
|
||||||
if (Settings::Get('system.nssextrausers') == 1) {
|
if (Settings::Get('system.nssextrausers') == 1) {
|
||||||
// this is used so that the libnss-extrausers cron is fired
|
// this is used so that the libnss-extrausers cron is fired
|
||||||
\Froxlor\System\Cronjob::inserttask(5);
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::CREATE_FTP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ class HostingPlans extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resou
|
|||||||
|
|
||||||
// validation
|
// validation
|
||||||
$name = \Froxlor\Validate\Validate::validate(trim($name), 'name', '', '', array(), true);
|
$name = \Froxlor\Validate\Validate::validate(trim($name), 'name', '', '', array(), true);
|
||||||
$description = \Froxlor\Validate\Validate::validate(str_replace("\r\n", "\n", $description), 'description', '/^[^\0]*$/');
|
$description = \Froxlor\Validate\Validate::validate(str_replace("\r\n", "\n", $description), 'description', \Froxlor\Validate\Validate::REGEX_DESC_TEXT);
|
||||||
|
|
||||||
if (Settings::Get('system.mail_quota_enabled') != '1') {
|
if (Settings::Get('system.mail_quota_enabled') != '1') {
|
||||||
$value_arr['email_quota'] = - 1;
|
$value_arr['email_quota'] = - 1;
|
||||||
@@ -361,7 +361,7 @@ class HostingPlans extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resou
|
|||||||
|
|
||||||
// validation
|
// validation
|
||||||
$name = \Froxlor\Validate\Validate::validate(trim($name), 'name', '', '', array(), true);
|
$name = \Froxlor\Validate\Validate::validate(trim($name), 'name', '', '', array(), true);
|
||||||
$description = \Froxlor\Validate\Validate::validate(str_replace("\r\n", "\n", $description), 'description', '/^[^\0]*$/');
|
$description = \Froxlor\Validate\Validate::validate(str_replace("\r\n", "\n", $description), 'description', \Froxlor\Validate\Validate::REGEX_DESC_TEXT);
|
||||||
|
|
||||||
if (Settings::Get('system.mail_quota_enabled') != '1') {
|
if (Settings::Get('system.mail_quota_enabled') != '1') {
|
||||||
$value_arr['email_quota'] = - 1;
|
$value_arr['email_quota'] = - 1;
|
||||||
|
|||||||
@@ -298,9 +298,9 @@ class IpsAndPorts extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour
|
|||||||
Database::pexecute($ins_stmt, $ins_data);
|
Database::pexecute($ins_stmt, $ins_data);
|
||||||
$ins_data['id'] = Database::lastInsertId();
|
$ins_data['id'] = Database::lastInsertId();
|
||||||
|
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
// Using nameserver, insert a task which rebuilds the server config
|
// Using nameserver, insert a task which rebuilds the server config
|
||||||
\Froxlor\System\Cronjob::inserttask('4');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_DNS);
|
||||||
|
|
||||||
if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
|
if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
|
||||||
$ip = '[' . $ip . ']';
|
$ip = '[' . $ip . ']';
|
||||||
@@ -511,9 +511,9 @@ class IpsAndPorts extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour
|
|||||||
);
|
);
|
||||||
Database::pexecute($upd_stmt, $upd_data);
|
Database::pexecute($upd_stmt, $upd_data);
|
||||||
|
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
// Using nameserver, insert a task which rebuilds the server config
|
// Using nameserver, insert a task which rebuilds the server config
|
||||||
\Froxlor\System\Cronjob::inserttask('4');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_DNS);
|
||||||
|
|
||||||
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_WARNING, "[API] changed IP/port from '" . $result['ip'] . ":" . $result['port'] . "' to '" . $ip . ":" . $port . "'");
|
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_WARNING, "[API] changed IP/port from '" . $result['ip'] . ":" . $result['port'] . "' to '" . $ip . ":" . $port . "'");
|
||||||
|
|
||||||
@@ -584,9 +584,9 @@ class IpsAndPorts extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour
|
|||||||
'id' => $id
|
'id' => $id
|
||||||
), true, true);
|
), true, true);
|
||||||
|
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
// Using nameserver, insert a task which rebuilds the server config
|
// Using nameserver, insert a task which rebuilds the server config
|
||||||
\Froxlor\System\Cronjob::inserttask('4');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_DNS);
|
||||||
|
|
||||||
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_WARNING, "[API] deleted IP/port '" . $result['ip'] . ":" . $result['port'] . "'");
|
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_WARNING, "[API] deleted IP/port '" . $result['ip'] . ":" . $result['port'] . "'");
|
||||||
return $this->response(200, "successful", $result);
|
return $this->response(200, "successful", $result);
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Froxlor\Api\Commands;
|
namespace Froxlor\Api\Commands;
|
||||||
|
|
||||||
use Froxlor\Database\Database;
|
use Froxlor\Database\Database;
|
||||||
@@ -46,141 +47,144 @@ class Mysqls extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEnt
|
|||||||
*/
|
*/
|
||||||
public function add()
|
public function add()
|
||||||
{
|
{
|
||||||
// required parameters
|
if (($this->getUserDetail('mysqls_used') < $this->getUserDetail('mysqls') || $this->getUserDetail('mysqls') == '-1') || $this->isAdmin()) {
|
||||||
$password = $this->getParam('mysql_password');
|
// required parameters
|
||||||
|
$password = $this->getParam('mysql_password');
|
||||||
|
|
||||||
// parameters
|
// parameters
|
||||||
$dbserver = $this->getParam('mysql_server', true, 0);
|
$dbserver = $this->getParam('mysql_server', true, 0);
|
||||||
$databasedescription = $this->getParam('description', true, '');
|
$databasedescription = $this->getParam('description', true, '');
|
||||||
$databasename = $this->getParam('custom_suffix', true, '');
|
$databasename = $this->getParam('custom_suffix', true, '');
|
||||||
$sendinfomail = $this->getBoolParam('sendinfomail', true, 0);
|
$sendinfomail = $this->getBoolParam('sendinfomail', true, 0);
|
||||||
// get needed customer info to reduce the mysql-usage-counter by one
|
// get needed customer info to reduce the mysql-usage-counter by one
|
||||||
$customer = $this->getCustomerData('mysqls');
|
$customer = $this->getCustomerData('mysqls');
|
||||||
|
|
||||||
// validation
|
// validation
|
||||||
$password = \Froxlor\Validate\Validate::validate($password, 'password', '', '', array(), true);
|
$password = \Froxlor\Validate\Validate::validate($password, 'password', '', '', array(), true);
|
||||||
$password = \Froxlor\System\Crypt::validatePassword($password, true);
|
$password = \Froxlor\System\Crypt::validatePassword($password, true);
|
||||||
$databasedescription = \Froxlor\Validate\Validate::validate(trim($databasedescription), 'description', '', '', array(), true);
|
$databasedescription = \Froxlor\Validate\Validate::validate(trim($databasedescription), 'description', \Froxlor\Validate\Validate::REGEX_DESC_TEXT, '', array(), true);
|
||||||
if (!empty($databasename)) {
|
if (!empty($databasename)) {
|
||||||
$databasename = \Froxlor\Validate\Validate::validate(trim($databasename), 'database_name', '/^[A-Za-z0-9][A-Za-z0-9\-_]+$/i', '', array(), true);
|
$databasename = \Froxlor\Validate\Validate::validate(trim($databasename), 'database_name', '/^[A-Za-z0-9][A-Za-z0-9\-_]+$/i', '', array(), true);
|
||||||
}
|
|
||||||
|
|
||||||
// validate whether the dbserver exists
|
|
||||||
$dbserver = \Froxlor\Validate\Validate::validate($dbserver, html_entity_decode($this->lng['mysql']['mysql_server']), '', '', 0, true);
|
|
||||||
Database::needRoot(true, $dbserver);
|
|
||||||
Database::needSqlData();
|
|
||||||
$sql_root = Database::getSqlData();
|
|
||||||
Database::needRoot(false);
|
|
||||||
if (! isset($sql_root) || ! is_array($sql_root)) {
|
|
||||||
throw new \Exception("Database server with index #" . $dbserver . " is unknown", 404);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($sendinfomail != 1) {
|
|
||||||
$sendinfomail = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
$newdb_params = array(
|
|
||||||
'loginname' => ($this->isAdmin() ? $customer['loginname'] : $this->getUserDetail('loginname')),
|
|
||||||
'mysql_lastaccountnumber' => ($this->isAdmin() ? $customer['mysql_lastaccountnumber'] : $this->getUserDetail('mysql_lastaccountnumber'))
|
|
||||||
);
|
|
||||||
// create database, user, set permissions, etc.pp.
|
|
||||||
$dbm = new \Froxlor\Database\DbManager($this->logger());
|
|
||||||
|
|
||||||
if(strtoupper(Settings::Get('customer.mysqlprefix')) == 'DBNAME' && !empty($databasename)) {
|
|
||||||
$username = $dbm->createDatabase($newdb_params['loginname'].'_'.$databasename, $password);
|
|
||||||
} else {
|
|
||||||
$username = $dbm->createDatabase($newdb_params['loginname'], $password, $newdb_params['mysql_lastaccountnumber']);
|
|
||||||
}
|
|
||||||
|
|
||||||
// we've checked against the password in dbm->createDatabase
|
|
||||||
if ($username == false) {
|
|
||||||
\Froxlor\UI\Response::standard_error('passwordshouldnotbeusername', '', true);
|
|
||||||
}
|
|
||||||
|
|
||||||
// add database info to froxlor
|
|
||||||
$stmt = Database::prepare("
|
|
||||||
INSERT INTO `" . TABLE_PANEL_DATABASES . "`
|
|
||||||
SET
|
|
||||||
`customerid` = :customerid,
|
|
||||||
`databasename` = :databasename,
|
|
||||||
`description` = :description,
|
|
||||||
`dbserver` = :dbserver
|
|
||||||
");
|
|
||||||
$params = array(
|
|
||||||
"customerid" => $customer['customerid'],
|
|
||||||
"databasename" => $username,
|
|
||||||
"description" => $databasedescription,
|
|
||||||
"dbserver" => $dbserver
|
|
||||||
);
|
|
||||||
Database::pexecute($stmt, $params, true, true);
|
|
||||||
$databaseid = Database::lastInsertId();
|
|
||||||
$params['id'] = $databaseid;
|
|
||||||
|
|
||||||
// update customer usage
|
|
||||||
Customers::increaseUsage($customer['customerid'], 'mysqls_used');
|
|
||||||
Customers::increaseUsage($customer['customerid'], 'mysql_lastaccountnumber');
|
|
||||||
|
|
||||||
// send info-mail?
|
|
||||||
if ($sendinfomail == 1) {
|
|
||||||
$pma = $this->lng['admin']['notgiven'];
|
|
||||||
if (Settings::Get('panel.phpmyadmin_url') != '') {
|
|
||||||
$pma = Settings::Get('panel.phpmyadmin_url');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// validate whether the dbserver exists
|
||||||
|
$dbserver = \Froxlor\Validate\Validate::validate($dbserver, html_entity_decode($this->lng['mysql']['mysql_server']), '', '', 0, true);
|
||||||
Database::needRoot(true, $dbserver);
|
Database::needRoot(true, $dbserver);
|
||||||
Database::needSqlData();
|
Database::needSqlData();
|
||||||
$sql_root = Database::getSqlData();
|
$sql_root = Database::getSqlData();
|
||||||
Database::needRoot(false);
|
Database::needRoot(false);
|
||||||
$userinfo = $customer;
|
if (!isset($sql_root) || !is_array($sql_root)) {
|
||||||
|
throw new \Exception("Database server with index #" . $dbserver . " is unknown", 404);
|
||||||
|
}
|
||||||
|
|
||||||
$replace_arr = array(
|
if ($sendinfomail != 1) {
|
||||||
'SALUTATION' => \Froxlor\User::getCorrectUserSalutation($userinfo),
|
$sendinfomail = 0;
|
||||||
'CUST_NAME' => \Froxlor\User::getCorrectUserSalutation($userinfo), // < keep this for compatibility
|
}
|
||||||
'NAME' => $userinfo['name'],
|
|
||||||
'FIRSTNAME' => $userinfo['firstname'],
|
$newdb_params = array(
|
||||||
'COMPANY' => $userinfo['company'],
|
'loginname' => ($this->isAdmin() ? $customer['loginname'] : $this->getUserDetail('loginname')),
|
||||||
'CUSTOMER_NO' => $userinfo['customernumber'],
|
'mysql_lastaccountnumber' => ($this->isAdmin() ? $customer['mysql_lastaccountnumber'] : $this->getUserDetail('mysql_lastaccountnumber'))
|
||||||
'DB_NAME' => $username,
|
|
||||||
'DB_PASS' => htmlentities(htmlentities($password)),
|
|
||||||
'DB_DESC' => $databasedescription,
|
|
||||||
'DB_SRV' => $sql_root['host'],
|
|
||||||
'PMA_URI' => $pma
|
|
||||||
);
|
);
|
||||||
|
// create database, user, set permissions, etc.pp.
|
||||||
|
$dbm = new \Froxlor\Database\DbManager($this->logger());
|
||||||
|
|
||||||
// get template for mail subject
|
if (strtoupper(Settings::Get('customer.mysqlprefix')) == 'DBNAME' && !empty($databasename)) {
|
||||||
$mail_subject = $this->getMailTemplate($userinfo, 'mails', 'new_database_by_customer_subject', $replace_arr, $this->lng['mails']['new_database_by_customer']['subject']);
|
$username = $dbm->createDatabase($newdb_params['loginname'] . '_' . $databasename, $password);
|
||||||
// get template for mail body
|
} else {
|
||||||
$mail_body = $this->getMailTemplate($userinfo, 'mails', 'new_database_by_customer_mailbody', $replace_arr, $this->lng['mails']['new_database_by_customer']['mailbody']);
|
$username = $dbm->createDatabase($newdb_params['loginname'], $password, $newdb_params['mysql_lastaccountnumber']);
|
||||||
|
|
||||||
$_mailerror = false;
|
|
||||||
$mailerr_msg = "";
|
|
||||||
try {
|
|
||||||
$this->mailer()->Subject = $mail_subject;
|
|
||||||
$this->mailer()->AltBody = $mail_body;
|
|
||||||
$this->mailer()->msgHTML(str_replace("\n", "<br />", $mail_body));
|
|
||||||
$this->mailer()->addAddress($userinfo['email'], \Froxlor\User::getCorrectUserSalutation($userinfo));
|
|
||||||
$this->mailer()->send();
|
|
||||||
} catch (\PHPMailer\PHPMailer\Exception $e) {
|
|
||||||
$mailerr_msg = $e->errorMessage();
|
|
||||||
$_mailerror = true;
|
|
||||||
} catch (\Exception $e) {
|
|
||||||
$mailerr_msg = $e->getMessage();
|
|
||||||
$_mailerror = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_mailerror) {
|
// we've checked against the password in dbm->createDatabase
|
||||||
$this->logger()->logAction($this->isAdmin() ? \Froxlor\FroxlorLogger::ADM_ACTION : \Froxlor\FroxlorLogger::USR_ACTION, LOG_ERR, "[API] Error sending mail: " . $mailerr_msg);
|
if ($username == false) {
|
||||||
\Froxlor\UI\Response::standard_error('errorsendingmail', $userinfo['email'], true);
|
\Froxlor\UI\Response::standard_error('passwordshouldnotbeusername', '', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->mailer()->clearAddresses();
|
// add database info to froxlor
|
||||||
|
$stmt = Database::prepare("
|
||||||
|
INSERT INTO `" . TABLE_PANEL_DATABASES . "`
|
||||||
|
SET
|
||||||
|
`customerid` = :customerid,
|
||||||
|
`databasename` = :databasename,
|
||||||
|
`description` = :description,
|
||||||
|
`dbserver` = :dbserver
|
||||||
|
");
|
||||||
|
$params = array(
|
||||||
|
"customerid" => $customer['customerid'],
|
||||||
|
"databasename" => $username,
|
||||||
|
"description" => $databasedescription,
|
||||||
|
"dbserver" => $dbserver
|
||||||
|
);
|
||||||
|
Database::pexecute($stmt, $params, true, true);
|
||||||
|
$databaseid = Database::lastInsertId();
|
||||||
|
$params['id'] = $databaseid;
|
||||||
|
|
||||||
|
// update customer usage
|
||||||
|
Customers::increaseUsage($customer['customerid'], 'mysqls_used');
|
||||||
|
Customers::increaseUsage($customer['customerid'], 'mysql_lastaccountnumber');
|
||||||
|
|
||||||
|
// send info-mail?
|
||||||
|
if ($sendinfomail == 1) {
|
||||||
|
$pma = $this->lng['admin']['notgiven'];
|
||||||
|
if (Settings::Get('panel.phpmyadmin_url') != '') {
|
||||||
|
$pma = Settings::Get('panel.phpmyadmin_url');
|
||||||
|
}
|
||||||
|
|
||||||
|
Database::needRoot(true, $dbserver);
|
||||||
|
Database::needSqlData();
|
||||||
|
$sql_root = Database::getSqlData();
|
||||||
|
Database::needRoot(false);
|
||||||
|
$userinfo = $customer;
|
||||||
|
|
||||||
|
$replace_arr = array(
|
||||||
|
'SALUTATION' => \Froxlor\User::getCorrectUserSalutation($userinfo),
|
||||||
|
'CUST_NAME' => \Froxlor\User::getCorrectUserSalutation($userinfo), // < keep this for compatibility
|
||||||
|
'NAME' => $userinfo['name'],
|
||||||
|
'FIRSTNAME' => $userinfo['firstname'],
|
||||||
|
'COMPANY' => $userinfo['company'],
|
||||||
|
'CUSTOMER_NO' => $userinfo['customernumber'],
|
||||||
|
'DB_NAME' => $username,
|
||||||
|
'DB_PASS' => htmlentities(htmlentities($password)),
|
||||||
|
'DB_DESC' => $databasedescription,
|
||||||
|
'DB_SRV' => $sql_root['host'],
|
||||||
|
'PMA_URI' => $pma
|
||||||
|
);
|
||||||
|
|
||||||
|
// get template for mail subject
|
||||||
|
$mail_subject = $this->getMailTemplate($userinfo, 'mails', 'new_database_by_customer_subject', $replace_arr, $this->lng['mails']['new_database_by_customer']['subject']);
|
||||||
|
// get template for mail body
|
||||||
|
$mail_body = $this->getMailTemplate($userinfo, 'mails', 'new_database_by_customer_mailbody', $replace_arr, $this->lng['mails']['new_database_by_customer']['mailbody']);
|
||||||
|
|
||||||
|
$_mailerror = false;
|
||||||
|
$mailerr_msg = "";
|
||||||
|
try {
|
||||||
|
$this->mailer()->Subject = $mail_subject;
|
||||||
|
$this->mailer()->AltBody = $mail_body;
|
||||||
|
$this->mailer()->msgHTML(str_replace("\n", "<br />", $mail_body));
|
||||||
|
$this->mailer()->addAddress($userinfo['email'], \Froxlor\User::getCorrectUserSalutation($userinfo));
|
||||||
|
$this->mailer()->send();
|
||||||
|
} catch (\PHPMailer\PHPMailer\Exception $e) {
|
||||||
|
$mailerr_msg = $e->errorMessage();
|
||||||
|
$_mailerror = true;
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$mailerr_msg = $e->getMessage();
|
||||||
|
$_mailerror = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_mailerror) {
|
||||||
|
$this->logger()->logAction($this->isAdmin() ? \Froxlor\FroxlorLogger::ADM_ACTION : \Froxlor\FroxlorLogger::USR_ACTION, LOG_ERR, "[API] Error sending mail: " . $mailerr_msg);
|
||||||
|
\Froxlor\UI\Response::standard_error('errorsendingmail', $userinfo['email'], true);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->mailer()->clearAddresses();
|
||||||
|
}
|
||||||
|
$this->logger()->logAction($this->isAdmin() ? \Froxlor\FroxlorLogger::ADM_ACTION : \Froxlor\FroxlorLogger::USR_ACTION, LOG_WARNING, "[API] added mysql-database '" . $username . "'");
|
||||||
|
|
||||||
|
$result = $this->apiCall('Mysqls.get', array(
|
||||||
|
'dbname' => $username
|
||||||
|
));
|
||||||
|
return $this->response(200, "successful", $result);
|
||||||
}
|
}
|
||||||
$this->logger()->logAction($this->isAdmin() ? \Froxlor\FroxlorLogger::ADM_ACTION : \Froxlor\FroxlorLogger::USR_ACTION, LOG_WARNING, "[API] added mysql-database '" . $username . "'");
|
throw new \Exception("No more resources available", 406);
|
||||||
|
|
||||||
$result = $this->apiCall('Mysqls.get', array(
|
|
||||||
'dbname' => $username
|
|
||||||
));
|
|
||||||
return $this->response(200, "successful", $result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -202,7 +206,7 @@ class Mysqls extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEnt
|
|||||||
$id = $this->getParam('id', true, 0);
|
$id = $this->getParam('id', true, 0);
|
||||||
$dn_optional = ($id <= 0 ? false : true);
|
$dn_optional = ($id <= 0 ? false : true);
|
||||||
$dbname = $this->getParam('dbname', $dn_optional, '');
|
$dbname = $this->getParam('dbname', $dn_optional, '');
|
||||||
$dbserver = $this->getParam('mysql_server', true, - 1);
|
$dbserver = $this->getParam('mysql_server', true, -1);
|
||||||
|
|
||||||
if ($this->isAdmin()) {
|
if ($this->isAdmin()) {
|
||||||
if ($this->getUserDetail('customers_see_all') != 1) {
|
if ($this->getUserDetail('customers_see_all') != 1) {
|
||||||
@@ -302,7 +306,7 @@ class Mysqls extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEnt
|
|||||||
$id = $this->getParam('id', true, 0);
|
$id = $this->getParam('id', true, 0);
|
||||||
$dn_optional = ($id <= 0 ? false : true);
|
$dn_optional = ($id <= 0 ? false : true);
|
||||||
$dbname = $this->getParam('dbname', $dn_optional, '');
|
$dbname = $this->getParam('dbname', $dn_optional, '');
|
||||||
$dbserver = $this->getParam('mysql_server', true, - 1);
|
$dbserver = $this->getParam('mysql_server', true, -1);
|
||||||
$customer = $this->getCustomerData();
|
$customer = $this->getCustomerData();
|
||||||
|
|
||||||
if ($this->isAdmin() == false && Settings::IsInList('panel.customer_hide_options', 'mysql')) {
|
if ($this->isAdmin() == false && Settings::IsInList('panel.customer_hide_options', 'mysql')) {
|
||||||
@@ -322,7 +326,7 @@ class Mysqls extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEnt
|
|||||||
|
|
||||||
// validation
|
// validation
|
||||||
$password = \Froxlor\Validate\Validate::validate($password, 'password', '', '', array(), true);
|
$password = \Froxlor\Validate\Validate::validate($password, 'password', '', '', array(), true);
|
||||||
$databasedescription = \Froxlor\Validate\Validate::validate(trim($databasedescription), 'description', '', '', array(), true);
|
$databasedescription = \Froxlor\Validate\Validate::validate(trim($databasedescription), 'description', \Froxlor\Validate\Validate::REGEX_DESC_TEXT, '', array(), true);
|
||||||
|
|
||||||
if ($password != '') {
|
if ($password != '') {
|
||||||
// validate password
|
// validate password
|
||||||
@@ -389,7 +393,7 @@ class Mysqls extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEnt
|
|||||||
public function listing()
|
public function listing()
|
||||||
{
|
{
|
||||||
$result = array();
|
$result = array();
|
||||||
$dbserver = $this->getParam('mysql_server', true, - 1);
|
$dbserver = $this->getParam('mysql_server', true, -1);
|
||||||
$customer_ids = $this->getAllowedCustomerIds('mysql');
|
$customer_ids = $this->getAllowedCustomerIds('mysql');
|
||||||
$query_fields = array();
|
$query_fields = array();
|
||||||
$result_stmt = Database::prepare("
|
$result_stmt = Database::prepare("
|
||||||
@@ -486,7 +490,7 @@ class Mysqls extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEnt
|
|||||||
$id = $this->getParam('id', true, 0);
|
$id = $this->getParam('id', true, 0);
|
||||||
$dn_optional = ($id <= 0 ? false : true);
|
$dn_optional = ($id <= 0 ? false : true);
|
||||||
$dbname = $this->getParam('dbname', $dn_optional, '');
|
$dbname = $this->getParam('dbname', $dn_optional, '');
|
||||||
$dbserver = $this->getParam('mysql_server', true, - 1);
|
$dbserver = $this->getParam('mysql_server', true, -1);
|
||||||
$customer = $this->getCustomerData();
|
$customer = $this->getCustomerData();
|
||||||
|
|
||||||
if ($this->isAdmin() == false && Settings::IsInList('panel.customer_hide_options', 'mysql')) {
|
if ($this->isAdmin() == false && Settings::IsInList('panel.customer_hide_options', 'mysql')) {
|
||||||
|
|||||||
@@ -266,7 +266,7 @@ class PhpSettings extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour
|
|||||||
$allow_all_customers = $this->getBoolParam('allow_all_customers', true, 0);
|
$allow_all_customers = $this->getBoolParam('allow_all_customers', true, 0);
|
||||||
|
|
||||||
// validation
|
// validation
|
||||||
$description = \Froxlor\Validate\Validate::validate($description, 'description', '', '', array(), true);
|
$description = \Froxlor\Validate\Validate::validate($description, 'description', \Froxlor\Validate\Validate::REGEX_DESC_TEXT, '', array(), true);
|
||||||
$phpsettings = \Froxlor\Validate\Validate::validate(str_replace("\r\n", "\n", $phpsettings), 'phpsettings', '/^[^\0]*$/', '', array(), true);
|
$phpsettings = \Froxlor\Validate\Validate::validate(str_replace("\r\n", "\n", $phpsettings), 'phpsettings', '/^[^\0]*$/', '', array(), true);
|
||||||
if (Settings::Get('system.mod_fcgid') == 1) {
|
if (Settings::Get('system.mod_fcgid') == 1) {
|
||||||
$binary = \Froxlor\FileDir::makeCorrectFile(\Froxlor\Validate\Validate::validate($binary, 'binary', '', '', array(), true));
|
$binary = \Froxlor\FileDir::makeCorrectFile(\Froxlor\Validate\Validate::validate($binary, 'binary', '', '', array(), true));
|
||||||
@@ -364,7 +364,7 @@ class PhpSettings extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour
|
|||||||
Database::pexecute($ins_stmt, $ins_data, true, true);
|
Database::pexecute($ins_stmt, $ins_data, true, true);
|
||||||
$ins_data['id'] = Database::lastInsertId();
|
$ins_data['id'] = Database::lastInsertId();
|
||||||
|
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] php setting with description '" . $description . "' has been created by '" . $this->getUserDetail('loginname') . "'");
|
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] php setting with description '" . $description . "' has been created by '" . $this->getUserDetail('loginname') . "'");
|
||||||
|
|
||||||
$result = $this->apiCall('PhpSettings.get', array(
|
$result = $this->apiCall('PhpSettings.get', array(
|
||||||
@@ -466,7 +466,7 @@ class PhpSettings extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour
|
|||||||
$allow_all_customers = $this->getBoolParam('allow_all_customers', true, 0);
|
$allow_all_customers = $this->getBoolParam('allow_all_customers', true, 0);
|
||||||
|
|
||||||
// validation
|
// validation
|
||||||
$description = \Froxlor\Validate\Validate::validate($description, 'description', '', '', array(), true);
|
$description = \Froxlor\Validate\Validate::validate($description, 'description', \Froxlor\Validate\Validate::REGEX_DESC_TEXT, '', array(), true);
|
||||||
$phpsettings = \Froxlor\Validate\Validate::validate(str_replace("\r\n", "\n", $phpsettings), 'phpsettings', '/^[^\0]*$/', '', array(), true);
|
$phpsettings = \Froxlor\Validate\Validate::validate(str_replace("\r\n", "\n", $phpsettings), 'phpsettings', '/^[^\0]*$/', '', array(), true);
|
||||||
if (Settings::Get('system.mod_fcgid') == 1) {
|
if (Settings::Get('system.mod_fcgid') == 1) {
|
||||||
$binary = \Froxlor\FileDir::makeCorrectFile(\Froxlor\Validate\Validate::validate($binary, 'binary', '', '', array(), true));
|
$binary = \Froxlor\FileDir::makeCorrectFile(\Froxlor\Validate\Validate::validate($binary, 'binary', '', '', array(), true));
|
||||||
@@ -565,7 +565,7 @@ class PhpSettings extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour
|
|||||||
);
|
);
|
||||||
Database::pexecute($upd_stmt, $upd_data, true, true);
|
Database::pexecute($upd_stmt, $upd_data, true, true);
|
||||||
|
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] php setting with description '" . $description . "' has been updated by '" . $this->getUserDetail('loginname') . "'");
|
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] php setting with description '" . $description . "' has been updated by '" . $this->getUserDetail('loginname') . "'");
|
||||||
|
|
||||||
$result = $this->apiCall('PhpSettings.get', array(
|
$result = $this->apiCall('PhpSettings.get', array(
|
||||||
@@ -622,7 +622,7 @@ class PhpSettings extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour
|
|||||||
'id' => $id
|
'id' => $id
|
||||||
), true, true);
|
), true, true);
|
||||||
|
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] php setting '" . $result['description'] . "' has been deleted by '" . $this->getUserDetail('loginname') . "'");
|
$this->logger()->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "[API] php setting '" . $result['description'] . "' has been deleted by '" . $this->getUserDetail('loginname') . "'");
|
||||||
return $this->response(200, "successful", $result);
|
return $this->response(200, "successful", $result);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -359,9 +359,9 @@ class SubDomains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
|||||||
\Froxlor\Domain\Domain::addRedirectToDomain($subdomain_id, $redirectcode);
|
\Froxlor\Domain\Domain::addRedirectToDomain($subdomain_id, $redirectcode);
|
||||||
}
|
}
|
||||||
|
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
// Using nameserver, insert a task which rebuilds the server config
|
// Using nameserver, insert a task which rebuilds the server config
|
||||||
\Froxlor\System\Cronjob::inserttask('4');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_DNS);
|
||||||
|
|
||||||
Customers::increaseUsage($customer['customerid'], 'subdomains_used');
|
Customers::increaseUsage($customer['customerid'], 'subdomains_used');
|
||||||
|
|
||||||
@@ -733,11 +733,11 @@ class SubDomains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
|||||||
'id' => $id
|
'id' => $id
|
||||||
), true, true);
|
), true, true);
|
||||||
// remove domain from acme.sh / lets encrypt if used
|
// remove domain from acme.sh / lets encrypt if used
|
||||||
\Froxlor\System\Cronjob::inserttask('12', $result['domain']);
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::DELETE_DOMAIN_SSL, $result['domain']);
|
||||||
}
|
}
|
||||||
|
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
\Froxlor\System\Cronjob::inserttask('4');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_DNS);
|
||||||
$idna_convert = new \Froxlor\Idna\IdnaWrapper();
|
$idna_convert = new \Froxlor\Idna\IdnaWrapper();
|
||||||
$this->logger()->logAction($this->isAdmin() ? \Froxlor\FroxlorLogger::ADM_ACTION : \Froxlor\FroxlorLogger::USR_ACTION, LOG_INFO, "[API] edited domain '" . $idna_convert->decode($result['domain']) . "'");
|
$this->logger()->logAction($this->isAdmin() ? \Froxlor\FroxlorLogger::ADM_ACTION : \Froxlor\FroxlorLogger::USR_ACTION, LOG_INFO, "[API] edited domain '" . $idna_convert->decode($result['domain']) . "'");
|
||||||
}
|
}
|
||||||
@@ -1019,13 +1019,13 @@ class SubDomains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
|||||||
'domainid' => $id
|
'domainid' => $id
|
||||||
), true, true);
|
), true, true);
|
||||||
|
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
// Using nameserver, insert a task which rebuilds the server config
|
// Using nameserver, insert a task which rebuilds the server config
|
||||||
\Froxlor\System\Cronjob::inserttask('4');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_DNS);
|
||||||
// remove domains DNS from powerDNS if used, #581
|
// remove domains DNS from powerDNS if used, #581
|
||||||
\Froxlor\System\Cronjob::inserttask('11', $result['domain']);
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::DELETE_DOMAIN_PDNS, $result['domain']);
|
||||||
// remove domain from acme.sh / lets encrypt if used
|
// remove domain from acme.sh / lets encrypt if used
|
||||||
\Froxlor\System\Cronjob::inserttask('12', $result['domain']);
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::DELETE_DOMAIN_SSL, $result['domain']);
|
||||||
|
|
||||||
// reduce subdomain-usage-counter
|
// reduce subdomain-usage-counter
|
||||||
Customers::decreaseUsage($customer['customerid'], 'subdomains_used');
|
Customers::decreaseUsage($customer['customerid'], 'subdomains_used');
|
||||||
|
|||||||
@@ -85,8 +85,8 @@ class ConfigServicesAction extends \Froxlor\Cli\Action
|
|||||||
$distributions_select_data = array();
|
$distributions_select_data = array();
|
||||||
|
|
||||||
//set default os.
|
//set default os.
|
||||||
$os_dist = array('ID' => 'buster');
|
$os_dist = array('ID' => 'bullseye');
|
||||||
$os_version = array('0' => '10');
|
$os_version = array('0' => '11');
|
||||||
$os_default = $os_dist['ID'];
|
$os_default = $os_dist['ID'];
|
||||||
|
|
||||||
//read os-release
|
//read os-release
|
||||||
|
|||||||
100
lib/Froxlor/Cli/Action/PhpSessioncleanAction.php
Normal file
100
lib/Froxlor/Cli/Action/PhpSessioncleanAction.php
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Froxlor\Cli\Action;
|
||||||
|
|
||||||
|
use Froxlor\Database\Database;
|
||||||
|
use Froxlor\Settings;
|
||||||
|
use Froxlor\Cli\PhpSessioncleanCmd;
|
||||||
|
|
||||||
|
class PhpSessioncleanAction extends \Froxlor\Cli\Action
|
||||||
|
{
|
||||||
|
|
||||||
|
public function __construct($args)
|
||||||
|
{
|
||||||
|
parent::__construct($args);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
$this->validate();
|
||||||
|
|
||||||
|
if ((int) Settings::Get('phpfpm.enabled') == 1) {
|
||||||
|
if (isset($this->_args["max-lifetime"]) && is_numeric($this->_args["max-lifetime"]) && $this->_args["max-lifetime"] > 0) {
|
||||||
|
$this->cleanSessionfiles((int)$this->_args["max-lifetime"]);
|
||||||
|
} else {
|
||||||
|
// use default max-lifetime value
|
||||||
|
$this->cleanSessionfiles();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* validates the parsed command line parameters
|
||||||
|
*
|
||||||
|
* @throws \Exception
|
||||||
|
*/
|
||||||
|
private function validate()
|
||||||
|
{
|
||||||
|
global $lng;
|
||||||
|
|
||||||
|
$this->checkConfigParam(true);
|
||||||
|
$this->parseConfig();
|
||||||
|
|
||||||
|
require FROXLOR_INSTALL_DIR . '/lib/tables.inc.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
private function cleanSessionfiles(int $maxlifetime = 1440)
|
||||||
|
{
|
||||||
|
// store paths to clean up
|
||||||
|
$paths_to_clean = [];
|
||||||
|
// get all pool-config directories configured
|
||||||
|
$sel_stmt = Database::prepare("SELECT DISTINCT `config_dir` FROM `" . TABLE_PANEL_FPMDAEMONS . "`");
|
||||||
|
Database::pexecute($sel_stmt);
|
||||||
|
while ($fpmd = $sel_stmt->fetch(\PDO::FETCH_ASSOC)) {
|
||||||
|
$poolfiles = glob(\Froxlor\FileDir::makeCorrectFile($fpmd['config_dir'] . '/*.conf'));
|
||||||
|
foreach ($poolfiles as $cf) {
|
||||||
|
$contents = file_get_contents($cf);
|
||||||
|
$pattern = preg_quote('session.save_path', '/');
|
||||||
|
$pattern = "/" . $pattern . ".+?\=(.*)/";
|
||||||
|
if (preg_match_all($pattern, $contents, $matches)) {
|
||||||
|
$paths_to_clean[] = \Froxlor\FileDir::makeCorrectDir(trim($matches[1][0]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// every path is just needed once
|
||||||
|
$paths_to_clean = array_unique($paths_to_clean);
|
||||||
|
|
||||||
|
if (count($paths_to_clean) > 0) {
|
||||||
|
foreach ($paths_to_clean as $ptc) {
|
||||||
|
// find all files older then maxlifetime and delete them
|
||||||
|
\Froxlor\FileDir::safe_exec("find -O3 \"" . $ptc . "\" -ignore_readdir_race -depth -mindepth 1 -name 'sess_*' -type f -cmin \"+" . $maxlifetime . "\" -delete");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private function parseConfig()
|
||||||
|
{
|
||||||
|
define('FROXLOR_INSTALL_DIR', $this->_args['froxlor-dir']);
|
||||||
|
if (!class_exists('\\Froxlor\\Database\\Database')) {
|
||||||
|
throw new \Exception("Could not find froxlor's Database class. Is froxlor really installed to '" . FROXLOR_INSTALL_DIR . "'?");
|
||||||
|
}
|
||||||
|
if (!file_exists(FROXLOR_INSTALL_DIR . '/lib/userdata.inc.php')) {
|
||||||
|
throw new \Exception("Could not find froxlor's userdata.inc.php file. You should use this script only with a fully installed and setup froxlor system.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private function checkConfigParam($needed = false)
|
||||||
|
{
|
||||||
|
if ($needed) {
|
||||||
|
if (!isset($this->_args["froxlor-dir"])) {
|
||||||
|
$this->_args["froxlor-dir"] = \Froxlor\Froxlor::getInstallDir();
|
||||||
|
} elseif (!is_dir($this->_args["froxlor-dir"])) {
|
||||||
|
throw new \Exception("Given --froxlor-dir parameter is not a directory");
|
||||||
|
} elseif (!file_exists($this->_args["froxlor-dir"])) {
|
||||||
|
throw new \Exception("Given froxlor directory cannot be found ('" . $this->_args["froxlor-dir"] . "')");
|
||||||
|
} elseif (!is_readable($this->_args["froxlor-dir"])) {
|
||||||
|
throw new \Exception("Given froxlor directory cannot be read ('" . $this->_args["froxlor-dir"] . "')");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
64
lib/Froxlor/Cli/PhpSessioncleanCmd.php
Normal file
64
lib/Froxlor/Cli/PhpSessioncleanCmd.php
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Froxlor\Cli;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file is part of the Froxlor project.
|
||||||
|
* Copyright (c) 2022 the Froxlor Team (see authors).
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the COPYING
|
||||||
|
* file that was distributed with this source code. You can also view the
|
||||||
|
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
*
|
||||||
|
* @copyright (c) the authors
|
||||||
|
* @author Froxlor team <team@froxlor.org> (2018-)
|
||||||
|
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
* @package Cron
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class PhpSessioncleanCmd extends CmdLineHandler
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* list of valid switches
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
public static $switches = array(
|
||||||
|
'h'
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* list of valid parameters
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
public static $params = array(
|
||||||
|
'froxlor-dir',
|
||||||
|
'max-lifetime',
|
||||||
|
'help'
|
||||||
|
);
|
||||||
|
|
||||||
|
public static $action_class = '\\Froxlor\\Cli\\Action\\PhpSessioncleanAction';
|
||||||
|
|
||||||
|
public static function printHelp()
|
||||||
|
{
|
||||||
|
self::println("");
|
||||||
|
self::println("Help / command line parameters:");
|
||||||
|
self::println("");
|
||||||
|
// commands
|
||||||
|
self::println("--froxlor-dir\t\tpath to froxlor installation");
|
||||||
|
self::println("\t\t\tExample: --froxlor-dir=/var/www/froxlor/");
|
||||||
|
self::println("");
|
||||||
|
self::println("--max-lifetime\t\tThe number of seconds after which data will be seen as 'garbage' and potentially cleaned up. Defaults to '1440'");
|
||||||
|
self::println("\t\t\tExample: --max-lifetime=2000");
|
||||||
|
self::println("");
|
||||||
|
self::println("--help\t\t\tshow help screen (this)");
|
||||||
|
self::println("");
|
||||||
|
// switches
|
||||||
|
self::println("-h\t\t\tsame as --help");
|
||||||
|
self::println("");
|
||||||
|
|
||||||
|
die(); // end of execution
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -56,7 +56,9 @@ class ApacheFcgi extends Apache
|
|||||||
// start block, cut off last pipe and close block
|
// start block, cut off last pipe and close block
|
||||||
$filesmatch = '(' . str_replace(".", "\.", substr($filesmatch, 0, - 1)) . ')';
|
$filesmatch = '(' . str_replace(".", "\.", substr($filesmatch, 0, - 1)) . ')';
|
||||||
$php_options_text .= ' <FilesMatch \.' . $filesmatch . '$>' . "\n";
|
$php_options_text .= ' <FilesMatch \.' . $filesmatch . '$>' . "\n";
|
||||||
$php_options_text .= ' SetHandler proxy:unix:' . $domain['fpm_socket'] . '|fcgi://localhost' . "\n";
|
$php_options_text .= ' <If "-f %{SCRIPT_FILENAME}">' . "\n";
|
||||||
|
$php_options_text .= ' SetHandler proxy:unix:' . $domain['fpm_socket'] . '|fcgi://localhost' . "\n";
|
||||||
|
$php_options_text .= ' </If>' . "\n";
|
||||||
$php_options_text .= ' </FilesMatch>' . "\n";
|
$php_options_text .= ' </FilesMatch>' . "\n";
|
||||||
|
|
||||||
$mypath_dir = new \Froxlor\Http\Directory($domain['documentroot']);
|
$mypath_dir = new \Froxlor\Http\Directory($domain['documentroot']);
|
||||||
|
|||||||
@@ -24,6 +24,13 @@ class MasterCron extends \Froxlor\Cron\FroxlorCron
|
|||||||
|
|
||||||
private static $debugHandler = null;
|
private static $debugHandler = null;
|
||||||
|
|
||||||
|
private static $noncron_params = [
|
||||||
|
'force',
|
||||||
|
'debug',
|
||||||
|
'no-fork',
|
||||||
|
'run-task'
|
||||||
|
];
|
||||||
|
|
||||||
public static function setArguments($argv = null)
|
public static function setArguments($argv = null)
|
||||||
{
|
{
|
||||||
self::$argv = $argv;
|
self::$argv = $argv;
|
||||||
@@ -47,6 +54,7 @@ class MasterCron extends \Froxlor\Cron\FroxlorCron
|
|||||||
echo "--run-task\t\trun a specific task [1 = re-generate configs, 4 = re-generate dns zones, 10 = re-set quotas, 99 = re-create cron.d-file]\n";
|
echo "--run-task\t\trun a specific task [1 = re-generate configs, 4 = re-generate dns zones, 10 = re-set quotas, 99 = re-create cron.d-file]\n";
|
||||||
echo "--debug\t\t\toutput debug information about what is going on to STDOUT.\n";
|
echo "--debug\t\t\toutput debug information about what is going on to STDOUT.\n";
|
||||||
echo "--no-fork\t\tdo not fork to backkground (traffic cron only).\n\n";
|
echo "--no-fork\t\tdo not fork to backkground (traffic cron only).\n\n";
|
||||||
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -63,13 +71,13 @@ class MasterCron extends \Froxlor\Cron\FroxlorCron
|
|||||||
if (strtolower($argv[$x]) == '--force') {
|
if (strtolower($argv[$x]) == '--force') {
|
||||||
// really force re-generating of config-files by
|
// really force re-generating of config-files by
|
||||||
// inserting task 1
|
// inserting task 1
|
||||||
\Froxlor\System\Cronjob::inserttask('1');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_VHOST);
|
||||||
// bind (if enabled, \Froxlor\System\Cronjob::inserttask() checks this)
|
// bind (if enabled, \Froxlor\System\Cronjob::inserttask() checks this)
|
||||||
\Froxlor\System\Cronjob::inserttask('4');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_DNS);
|
||||||
// set quotas (if enabled)
|
// set quotas (if enabled)
|
||||||
\Froxlor\System\Cronjob::inserttask('10');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::CREATE_QUOTA);
|
||||||
// also regenerate cron.d-file
|
// also regenerate cron.d-file
|
||||||
\Froxlor\System\Cronjob::inserttask('99');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_CRON);
|
||||||
array_push($jobs_to_run, 'tasks');
|
array_push($jobs_to_run, 'tasks');
|
||||||
define('CRON_IS_FORCED', 1);
|
define('CRON_IS_FORCED', 1);
|
||||||
} elseif (strtolower($argv[$x]) == '--debug') {
|
} elseif (strtolower($argv[$x]) == '--debug') {
|
||||||
@@ -161,7 +169,7 @@ class MasterCron extends \Froxlor\Cron\FroxlorCron
|
|||||||
$crontype = "";
|
$crontype = "";
|
||||||
if (isset(self::$argv) && is_array(self::$argv) && count(self::$argv) > 1) {
|
if (isset(self::$argv) && is_array(self::$argv) && count(self::$argv) > 1) {
|
||||||
for ($x = 1; $x < count(self::$argv); $x ++) {
|
for ($x = 1; $x < count(self::$argv); $x ++) {
|
||||||
if (substr(strtolower(self::$argv[$x]), 0, 2) == '--' && strlen(self::$argv[$x]) > 3) {
|
if (substr(self::$argv[$x], 0, 2) == '--' && strlen(self::$argv[$x]) > 3 && !in_array(substr(strtolower(self::$argv[$x]), 2),self::$noncron_params)) {
|
||||||
$crontype = substr(strtolower(self::$argv[$x]), 2);
|
$crontype = substr(strtolower(self::$argv[$x]), 2);
|
||||||
$basename .= "-" . $crontype;
|
$basename .= "-" . $crontype;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ namespace Froxlor\Cron\System;
|
|||||||
use Froxlor\Database\Database;
|
use Froxlor\Database\Database;
|
||||||
use Froxlor\Settings;
|
use Froxlor\Settings;
|
||||||
|
|
||||||
|
use Froxlor\Cron\TaskId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file is part of the Froxlor project.
|
* This file is part of the Froxlor project.
|
||||||
* Copyright (c) 2003-2009 the SysCP Team (see authors).
|
* Copyright (c) 2003-2009 the SysCP Team (see authors).
|
||||||
@@ -45,55 +47,55 @@ class TasksCron extends \Froxlor\Cron\FroxlorCron
|
|||||||
$row['data'] = json_decode($row['data'], true);
|
$row['data'] = json_decode($row['data'], true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($row['type'] == '1') {
|
if ($row['type'] == TaskId::REBUILD_VHOST) {
|
||||||
/**
|
/**
|
||||||
* TYPE=1 MEANS TO REBUILD APACHE VHOSTS.CONF
|
* TYPE=1 MEANS TO REBUILD APACHE VHOSTS.CONF
|
||||||
*/
|
*/
|
||||||
self::rebuildWebserverConfigs();
|
self::rebuildWebserverConfigs();
|
||||||
} elseif ($row['type'] == '2') {
|
} elseif ($row['type'] == TaskId::CREATE_HOME) {
|
||||||
/**
|
/**
|
||||||
* TYPE=2 MEANS TO CREATE A NEW HOME AND CHOWN
|
* TYPE=2 MEANS TO CREATE A NEW HOME AND CHOWN
|
||||||
*/
|
*/
|
||||||
self::createNewHome($row);
|
self::createNewHome($row);
|
||||||
} elseif ($row['type'] == '4' && (int) Settings::Get('system.bind_enable') != 0) {
|
} elseif ($row['type'] == TaskId::REBUILD_DNS && (int) Settings::Get('system.bind_enable') != 0) {
|
||||||
/**
|
/**
|
||||||
* TYPE=4 MEANS THAT SOMETHING IN THE BIND CONFIG HAS CHANGED.
|
* TYPE=4 MEANS THAT SOMETHING IN THE BIND CONFIG HAS CHANGED.
|
||||||
* REBUILD froxlor_bind.conf IF BIND IS ENABLED
|
* REBUILD froxlor_bind.conf IF BIND IS ENABLED
|
||||||
*/
|
*/
|
||||||
self::rebuildDnsConfigs();
|
self::rebuildDnsConfigs();
|
||||||
} elseif ($row['type'] == '5') {
|
} elseif ($row['type'] == TaskId::CREATE_FTP) {
|
||||||
/**
|
/**
|
||||||
* TYPE=5 MEANS THAT A NEW FTP-ACCOUNT HAS BEEN CREATED, CREATE THE DIRECTORY
|
* TYPE=5 MEANS THAT A NEW FTP-ACCOUNT HAS BEEN CREATED, CREATE THE DIRECTORY
|
||||||
*/
|
*/
|
||||||
self::createNewFtpHome($row);
|
self::createNewFtpHome($row);
|
||||||
} elseif ($row['type'] == '6') {
|
} elseif ($row['type'] == TaskId::DELETE_CUSTOMER_FILES) {
|
||||||
/**
|
/**
|
||||||
* TYPE=6 MEANS THAT A CUSTOMER HAS BEEN DELETED AND THAT WE HAVE TO REMOVE ITS FILES
|
* TYPE=6 MEANS THAT A CUSTOMER HAS BEEN DELETED AND THAT WE HAVE TO REMOVE ITS FILES
|
||||||
*/
|
*/
|
||||||
self::deleteCustomerData($row);
|
self::deleteCustomerData($row);
|
||||||
} elseif ($row['type'] == '7') {
|
} elseif ($row['type'] == TaskId::DELETE_EMAIL_DATA) {
|
||||||
/**
|
/**
|
||||||
* TYPE=7 Customer deleted an email account and wants the data to be deleted on the filesystem
|
* TYPE=7 Customer deleted an email account and wants the data to be deleted on the filesystem
|
||||||
*/
|
*/
|
||||||
self::deleteEmailData($row);
|
self::deleteEmailData($row);
|
||||||
} elseif ($row['type'] == '8') {
|
} elseif ($row['type'] == TaskId::DELETE_FTP_DATA) {
|
||||||
/**
|
/**
|
||||||
* TYPE=8 Customer deleted a ftp account and wants the homedir to be deleted on the filesystem
|
* TYPE=8 Customer deleted a ftp account and wants the homedir to be deleted on the filesystem
|
||||||
* refs #293
|
* refs #293
|
||||||
*/
|
*/
|
||||||
self::deleteFtpData($row);
|
self::deleteFtpData($row);
|
||||||
} elseif ($row['type'] == '10' && (int) Settings::Get('system.diskquota_enabled') != 0) {
|
} elseif ($row['type'] == TaskId::CREATE_QUOTA && (int) Settings::Get('system.diskquota_enabled') != 0) {
|
||||||
/**
|
/**
|
||||||
* TYPE=10 Set the filesystem - quota
|
* TYPE=10 Set the filesystem - quota
|
||||||
*/
|
*/
|
||||||
self::setFilesystemQuota();
|
self::setFilesystemQuota();
|
||||||
} elseif ($row['type'] == '11' && Settings::Get('system.dns_server') == 'PowerDNS') {
|
} elseif ($row['type'] == TaskId::DELETE_DOMAIN_PDNS && Settings::Get('system.dns_server') == 'PowerDNS') {
|
||||||
/**
|
/**
|
||||||
* TYPE=11 domain has been deleted, remove from pdns database if used
|
* TYPE=11 domain has been deleted, remove from pdns database if used
|
||||||
*/
|
*/
|
||||||
\Froxlor\FroxlorLogger::getInstanceOf()->logAction(\Froxlor\FroxlorLogger::CRON_ACTION, LOG_NOTICE, "Removing PowerDNS entries for domain " . $row['data']['domain']);
|
\Froxlor\FroxlorLogger::getInstanceOf()->logAction(\Froxlor\FroxlorLogger::CRON_ACTION, LOG_NOTICE, "Removing PowerDNS entries for domain " . $row['data']['domain']);
|
||||||
\Froxlor\Dns\PowerDNS::cleanDomainZone($row['data']['domain']);
|
\Froxlor\Dns\PowerDNS::cleanDomainZone($row['data']['domain']);
|
||||||
} elseif ($row['type'] == '12') {
|
} elseif ($row['type'] == TaskId::DELETE_DOMAIN_SSL) {
|
||||||
/**
|
/**
|
||||||
* TYPE=12 domain has been deleted, remove from acme.sh/let's encrypt directory if used
|
* TYPE=12 domain has been deleted, remove from acme.sh/let's encrypt directory if used
|
||||||
*/
|
*/
|
||||||
|
|||||||
105
lib/Froxlor/Cron/TaskId.php
Normal file
105
lib/Froxlor/Cron/TaskId.php
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Froxlor\Cron;
|
||||||
|
|
||||||
|
|
||||||
|
class TaskId {
|
||||||
|
/**
|
||||||
|
* TYPE=1 MEANS TO REBUILD APACHE VHOSTS.CONF
|
||||||
|
*/
|
||||||
|
const REBUILD_VHOST = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TYPE=2 MEANS TO CREATE A NEW HOME AND CHOWN
|
||||||
|
*/
|
||||||
|
const CREATE_HOME = 2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TYPE=4 MEANS THAT SOMETHING IN THE DNS CONFIG HAS CHANGED.
|
||||||
|
* REBUILD froxlor_bind.conf IF BIND IS ENABLED, UPDATE DKIM KEYS
|
||||||
|
*/
|
||||||
|
const REBUILD_DNS = 4;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TYPE=5 MEANS THAT A NEW FTP-ACCOUNT HAS BEEN CREATED, CREATE THE DIRECTORY
|
||||||
|
*/
|
||||||
|
const CREATE_FTP = 5;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TYPE=6 MEANS THAT A CUSTOMER HAS BEEN DELETED AND THAT WE HAVE TO REMOVE ITS FILES
|
||||||
|
*/
|
||||||
|
const DELETE_CUSTOMER_FILES = 6;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TYPE=7 Customer deleted an email account and wants the data to be deleted on the filesystem
|
||||||
|
*/
|
||||||
|
const DELETE_EMAIL_DATA = 7;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TYPE=8 Customer deleted a ftp account and wants the homedir to be deleted on the filesystem
|
||||||
|
* refs #293
|
||||||
|
*/
|
||||||
|
const DELETE_FTP_DATA = 8;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TYPE=10 Set the filesystem - quota
|
||||||
|
*/
|
||||||
|
const CREATE_QUOTA = 10;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TYPE=11 domain has been deleted, remove from pdns database if used
|
||||||
|
*/
|
||||||
|
const DELETE_DOMAIN_PDNS = 11;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TYPE=12 domain has been deleted, remove from acme.sh/let's encrypt directory if used
|
||||||
|
*/
|
||||||
|
const DELETE_DOMAIN_SSL = 12;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TYPE=20 COSTUMERBACKUP
|
||||||
|
*/
|
||||||
|
const CREATE_CUSTOMER_BACKUP = 20;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TYPE=99 REGENERATE CRON
|
||||||
|
*/
|
||||||
|
const REBUILD_CRON = 99;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return if a cron task id is valid
|
||||||
|
* @param int|string $id cron task id (legacy string support)
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public static function isValid($id) {
|
||||||
|
static $reflContants;
|
||||||
|
if (!is_numeric($id)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$numericid = (int)$id;
|
||||||
|
if (!is_array($reflContants)) {
|
||||||
|
$reflClass = new \ReflectionClass(get_called_class());
|
||||||
|
$reflContants = $reflClass->getConstants();
|
||||||
|
}
|
||||||
|
return in_array($numericid, $reflContants, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get constant name by id
|
||||||
|
* @param int|string $id cron task id (legacy string support)
|
||||||
|
* @return string|false constant name or false if not found
|
||||||
|
*/
|
||||||
|
public static function convertToConstant($id) {
|
||||||
|
static $reflContants;
|
||||||
|
if (!is_numeric($id)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$numericid = (int)$id;
|
||||||
|
if (!is_array($reflContants)) {
|
||||||
|
$reflClass = new \ReflectionClass(get_called_class());
|
||||||
|
$reflContants = $reflClass->getConstants();
|
||||||
|
}
|
||||||
|
return array_search($numericid, $reflContants, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -7,7 +7,7 @@ final class Froxlor
|
|||||||
{
|
{
|
||||||
|
|
||||||
// Main version variable
|
// Main version variable
|
||||||
const VERSION = '0.10.32';
|
const VERSION = '0.10.33';
|
||||||
|
|
||||||
// Database version (YYYYMMDDC where C is a daily counter)
|
// Database version (YYYYMMDDC where C is a daily counter)
|
||||||
const DBVERSION = '202112310';
|
const DBVERSION = '202112310';
|
||||||
|
|||||||
@@ -145,13 +145,13 @@ class SImExporter
|
|||||||
// Catch image_data and save it
|
// Catch image_data and save it
|
||||||
if (isset($index_split[2]) && $index_split[2] === 'image_data' && !empty($_data[$index_split[0].'.'.$index_split[1]])) {
|
if (isset($index_split[2]) && $index_split[2] === 'image_data' && !empty($_data[$index_split[0].'.'.$index_split[1]])) {
|
||||||
$path = \Froxlor\Froxlor::getInstallDir().'/img/';
|
$path = \Froxlor\Froxlor::getInstallDir().'/img/';
|
||||||
if (!is_dir($path) && !mkdir($path, '0775')) {
|
if (!is_dir($path) && !mkdir($path, 0775)) {
|
||||||
throw new \Exception("img directory does not exist and cannot be created");
|
throw new \Exception("img directory does not exist and cannot be created");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure we can write to the upload directory
|
// Make sure we can write to the upload directory
|
||||||
if (!is_writable($path)) {
|
if (!is_writable($path)) {
|
||||||
if (!chmod($path, '0775')) {
|
if (!chmod($path, 0775)) {
|
||||||
throw new \Exception("Cannot write to img directory");
|
throw new \Exception("Cannot write to img directory");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
namespace Froxlor\Settings;
|
namespace Froxlor\Settings;
|
||||||
|
|
||||||
use Froxlor\Database\Database;
|
use Froxlor\Database\Database;
|
||||||
|
use Froxlor\FileDir;
|
||||||
use Froxlor\Settings;
|
use Froxlor\Settings;
|
||||||
|
|
||||||
class Store
|
class Store
|
||||||
@@ -174,7 +175,7 @@ class Store
|
|||||||
$returnvalue = self::storeSettingField($fieldname, $fielddata, $newfieldvalue);
|
$returnvalue = self::storeSettingField($fieldname, $fielddata, $newfieldvalue);
|
||||||
|
|
||||||
if ($returnvalue !== false) {
|
if ($returnvalue !== false) {
|
||||||
\Froxlor\System\Cronjob::inserttask('4');
|
\Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_DNS);
|
||||||
}
|
}
|
||||||
return $returnvalue;
|
return $returnvalue;
|
||||||
}
|
}
|
||||||
@@ -373,17 +374,18 @@ class Store
|
|||||||
if (isset($fielddata['settinggroup'], $fielddata['varname']) && is_array($fielddata) && $fielddata['settinggroup'] !== '' && $fielddata['varname'] !== '') {
|
if (isset($fielddata['settinggroup'], $fielddata['varname']) && is_array($fielddata) && $fielddata['settinggroup'] !== '' && $fielddata['varname'] !== '') {
|
||||||
$save_to = null;
|
$save_to = null;
|
||||||
$path = \Froxlor\Froxlor::getInstallDir().'/img/';
|
$path = \Froxlor\Froxlor::getInstallDir().'/img/';
|
||||||
|
$path = \Froxlor\FileDir::makeCorrectDir($path);
|
||||||
|
|
||||||
// New file?
|
// New file?
|
||||||
if (isset($_FILES[$fieldname]) && $_FILES[$fieldname]['tmp_name']) {
|
if (isset($_FILES[$fieldname]) && $_FILES[$fieldname]['tmp_name']) {
|
||||||
// Make sure upload directory exists
|
// Make sure upload directory exists
|
||||||
if (!is_dir($path) && !mkdir($path, '0775')) {
|
if (!is_dir($path) && !mkdir($path, 0775)) {
|
||||||
throw new \Exception("img directory does not exist and cannot be created");
|
throw new \Exception("img directory does not exist and cannot be created");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure we can write to the upload directory
|
// Make sure we can write to the upload directory
|
||||||
if (!is_writable($path)) {
|
if (!is_writable($path)) {
|
||||||
if (!chmod($path, '0775')) {
|
if (!chmod($path, 0775)) {
|
||||||
throw new \Exception("Cannot write to img directory");
|
throw new \Exception("Cannot write to img directory");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ namespace Froxlor\System;
|
|||||||
use Froxlor\Settings;
|
use Froxlor\Settings;
|
||||||
use Froxlor\Database\Database;
|
use Froxlor\Database\Database;
|
||||||
|
|
||||||
|
use Froxlor\Cron\TaskId;
|
||||||
|
|
||||||
class Cronjob
|
class Cronjob
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -93,29 +95,25 @@ class Cronjob
|
|||||||
* @param
|
* @param
|
||||||
* int Type of task
|
* int Type of task
|
||||||
* @param
|
* @param
|
||||||
* string Parameter 1
|
* string Parameter (possible to pass multiple times)
|
||||||
* @param
|
*
|
||||||
* string Parameter 2
|
|
||||||
* @param
|
|
||||||
* string Parameter 3
|
|
||||||
* @author Florian Lippert <flo@syscp.org>
|
* @author Florian Lippert <flo@syscp.org>
|
||||||
* @author Froxlor team <team@froxlor.org>
|
* @author Froxlor team <team@froxlor.org>
|
||||||
*/
|
*/
|
||||||
public static function inserttask($type, $param1 = '', $param2 = '', $param3 = '', $param4 = '')
|
public static function inserttask($type, ...$params)
|
||||||
{
|
{
|
||||||
|
|
||||||
// prepare the insert-statement
|
// prepare the insert-statement
|
||||||
$ins_stmt = Database::prepare("
|
$ins_stmt = Database::prepare("
|
||||||
INSERT INTO `" . TABLE_PANEL_TASKS . "` SET `type` = :type, `data` = :data
|
INSERT INTO `" . TABLE_PANEL_TASKS . "` SET `type` = :type, `data` = :data
|
||||||
");
|
");
|
||||||
|
|
||||||
if ($type == '1' || $type == '3' || $type == '4' || $type == '5' || $type == '10' || $type == '99') {
|
if ($type == TaskId::REBUILD_VHOST || $type == TaskId::REBUILD_DNS || $type == TaskId::CREATE_FTP || $type == TaskId::CREATE_QUOTA || $type == TaskId::REBUILD_CRON) {
|
||||||
// 4 = bind -> if bind disabled -> no task
|
// 4 = bind -> if bind disabled -> no task
|
||||||
if ($type == '4' && Settings::Get('system.bind_enable') == '0') {
|
if ($type == TaskId::REBUILD_DNS && Settings::Get('system.bind_enable') == '0') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 10 = quota -> if quota disabled -> no task
|
// 10 = quota -> if quota disabled -> no task
|
||||||
if ($type == '10' && Settings::Get('system.diskquota_enabled') == '0') {
|
if ($type == TaskId::CREATE_QUOTA && Settings::Get('system.diskquota_enabled') == '0') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,64 +130,64 @@ class Cronjob
|
|||||||
'type' => $type,
|
'type' => $type,
|
||||||
'data' => ''
|
'data' => ''
|
||||||
));
|
));
|
||||||
} elseif ($type == '2' && $param1 != '' && $param2 != '' && $param3 != '' && ($param4 == 0 || $param4 == 1)) {
|
} elseif ($type == TaskId::CREATE_HOME && count($params) == 4 && $params[0] != '' && $params[1] != '' && $params[2] != '' && ($params[3] == 0 || $params[3] == 1)) {
|
||||||
$data = array();
|
$data = array();
|
||||||
$data['loginname'] = $param1;
|
$data['loginname'] = $params[0];
|
||||||
$data['uid'] = $param2;
|
$data['uid'] = $params[1];
|
||||||
$data['gid'] = $param3;
|
$data['gid'] = $params[2];
|
||||||
$data['store_defaultindex'] = $param4;
|
$data['store_defaultindex'] = $params[3];
|
||||||
$data = json_encode($data);
|
$data = json_encode($data);
|
||||||
Database::pexecute($ins_stmt, array(
|
Database::pexecute($ins_stmt, array(
|
||||||
'type' => '2',
|
'type' => TaskId::CREATE_HOME,
|
||||||
'data' => $data
|
'data' => $data
|
||||||
));
|
));
|
||||||
} elseif ($type == '6' && $param1 != '') {
|
} elseif ($type == TaskId::DELETE_CUSTOMER_FILES && isset($params[0]) && $params[0] != '') {
|
||||||
$data = array();
|
$data = array();
|
||||||
$data['loginname'] = $param1;
|
$data['loginname'] = $params[0];
|
||||||
$data = json_encode($data);
|
$data = json_encode($data);
|
||||||
Database::pexecute($ins_stmt, array(
|
Database::pexecute($ins_stmt, array(
|
||||||
'type' => '6',
|
'type' => TaskId::DELETE_CUSTOMER_FILES,
|
||||||
'data' => $data
|
'data' => $data
|
||||||
));
|
));
|
||||||
} elseif ($type == '7' && $param1 != '' && $param2 != '') {
|
} elseif ($type == TaskId::DELETE_EMAIL_DATA && count($params) == 2 && $params[0] != '' && $params[1] != '') {
|
||||||
$data = array();
|
$data = array();
|
||||||
$data['loginname'] = $param1;
|
$data['loginname'] = $params[0];
|
||||||
$data['email'] = $param2;
|
$data['email'] = $params[1];
|
||||||
$data = json_encode($data);
|
$data = json_encode($data);
|
||||||
Database::pexecute($ins_stmt, array(
|
Database::pexecute($ins_stmt, array(
|
||||||
'type' => '7',
|
'type' => TaskId::DELETE_EMAIL_DATA,
|
||||||
'data' => $data
|
'data' => $data
|
||||||
));
|
));
|
||||||
} elseif ($type == '8' && $param1 != '' && $param2 != '') {
|
} elseif ($type == TaskId::DELETE_FTP_DATA && count($params) == 2 && $params[0] != '' && $params[1] != '') {
|
||||||
$data = array();
|
$data = array();
|
||||||
$data['loginname'] = $param1;
|
$data['loginname'] = $params[0];
|
||||||
$data['homedir'] = $param2;
|
$data['homedir'] = $params[1];
|
||||||
$data = json_encode($data);
|
$data = json_encode($data);
|
||||||
Database::pexecute($ins_stmt, array(
|
Database::pexecute($ins_stmt, array(
|
||||||
'type' => '8',
|
'type' => TaskId::DELETE_FTP_DATA,
|
||||||
'data' => $data
|
'data' => $data
|
||||||
));
|
));
|
||||||
} elseif ($type == '11' && $param1 != '' && Settings::Get('system.bind_enable') == '1' && Settings::Get('system.dns_server') == 'PowerDNS') {
|
} elseif ($type == TaskId::DELETE_DOMAIN_PDNS && isset($params[0]) && $params[0] != '' && Settings::Get('system.bind_enable') == '1' && Settings::Get('system.dns_server') == 'PowerDNS') {
|
||||||
// -> if bind disabled or dns-server not PowerDNS -> no task
|
// -> if bind disabled or dns-server not PowerDNS -> no task
|
||||||
$data = array();
|
$data = array();
|
||||||
$data['domain'] = $param1;
|
$data['domain'] = $params[0];
|
||||||
$data = json_encode($data);
|
$data = json_encode($data);
|
||||||
Database::pexecute($ins_stmt, array(
|
Database::pexecute($ins_stmt, array(
|
||||||
'type' => '11',
|
'type' => TaskId::DELETE_DOMAIN_PDNS,
|
||||||
'data' => $data
|
'data' => $data
|
||||||
));
|
));
|
||||||
} elseif ($type == '12' && $param1 != '') {
|
} elseif ($type == TaskId::DELETE_DOMAIN_SSL && isset($params[0]) && $params[0] != '') {
|
||||||
$data = array();
|
$data = array();
|
||||||
$data['domain'] = $param1;
|
$data['domain'] = $params[0];
|
||||||
$data = json_encode($data);
|
$data = json_encode($data);
|
||||||
Database::pexecute($ins_stmt, array(
|
Database::pexecute($ins_stmt, array(
|
||||||
'type' => '12',
|
'type' => TaskId::DELETE_DOMAIN_SSL,
|
||||||
'data' => $data
|
'data' => $data
|
||||||
));
|
));
|
||||||
} elseif ($type == '20' && is_array($param1)) {
|
} elseif ($type == TaskId::CREATE_CUSTOMER_BACKUP && isset($params[0]) && is_array($params[0])) {
|
||||||
$data = json_encode($param1);
|
$data = json_encode($params[0]);
|
||||||
Database::pexecute($ins_stmt, array(
|
Database::pexecute($ins_stmt, array(
|
||||||
'type' => '20',
|
'type' => TaskId::CREATE_CUSTOMER_BACKUP,
|
||||||
'data' => $data
|
'data' => $data
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@@ -248,57 +246,23 @@ class Cronjob
|
|||||||
$row['data'] = json_decode($row['data'], true);
|
$row['data'] = json_decode($row['data'], true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// rebuilding webserver-configuration
|
$task_id = $row['type'];
|
||||||
if ($row['type'] == '1') {
|
if (\Froxlor\Cron\TaskId::isValid($task_id)) {
|
||||||
$task_desc = $lng['tasks']['rebuild_webserverconfig'];
|
$task_constname = \Froxlor\Cron\TaskId::convertToConstant($task_id);
|
||||||
} elseif ($row['type'] == '2') {
|
$task_desc = isset($lng['tasks'][$task_constname]) ? $lng['tasks'][$task_constname] : $task_constname;
|
||||||
// adding new user/
|
|
||||||
$loginname = '';
|
|
||||||
if (is_array($row['data'])) {
|
if (is_array($row['data'])) {
|
||||||
$loginname = $row['data']['loginname'];
|
// task includes loginname
|
||||||
|
if (isset($row['data']['loginname'])) {
|
||||||
|
$loginname = $row['data']['loginname'];
|
||||||
|
$task_desc = str_replace('%loginname%', $loginname, $task_desc);
|
||||||
|
}
|
||||||
|
// task includes domain data
|
||||||
|
if (isset($row['data']['domain'])) {
|
||||||
|
$domain = $row['data']['domain'];
|
||||||
|
$task_desc = str_replace('%domain%', $domain, $task_desc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$task_desc = $lng['tasks']['adding_customer'];
|
|
||||||
$task_desc = str_replace('%loginname%', $loginname, $task_desc);
|
|
||||||
} elseif ($row['type'] == '4') {
|
|
||||||
// rebuilding bind-configuration
|
|
||||||
$task_desc = $lng['tasks']['rebuild_bindconfig'];
|
|
||||||
} elseif ($row['type'] == '5') {
|
|
||||||
// creating ftp-user directory
|
|
||||||
$task_desc = $lng['tasks']['creating_ftpdir'];
|
|
||||||
} elseif ($row['type'] == '6') {
|
|
||||||
// deleting user-files
|
|
||||||
$loginname = '';
|
|
||||||
if (is_array($row['data'])) {
|
|
||||||
$loginname = $row['data']['loginname'];
|
|
||||||
}
|
|
||||||
$task_desc = $lng['tasks']['deleting_customerfiles'];
|
|
||||||
$task_desc = str_replace('%loginname%', $loginname, $task_desc);
|
|
||||||
} elseif ($row['type'] == '7') {
|
|
||||||
// deleting email-account
|
|
||||||
$task_desc = $lng['tasks']['remove_emailacc_files'];
|
|
||||||
} elseif ($row['type'] == '8') {
|
|
||||||
// deleting ftp-account
|
|
||||||
$task_desc = $lng['tasks']['remove_ftpacc_files'];
|
|
||||||
} elseif ($row['type'] == '10') {
|
|
||||||
// Set FS - quota
|
|
||||||
$task_desc = $lng['tasks']['diskspace_set_quota'];
|
|
||||||
} elseif ($row['type'] == '11') {
|
|
||||||
// remove domain from pdns database if used
|
|
||||||
$task_desc = sprintf($lng['tasks']['remove_pdns_domain'], $row['data']['domain']);
|
|
||||||
} elseif ($row['type'] == '12') {
|
|
||||||
// remove domains ssl files
|
|
||||||
$task_desc = sprintf($lng['tasks']['remove_ssl_domain'], $row['data']['domain']);
|
|
||||||
} elseif ($row['type'] == '20') {
|
|
||||||
// deleting user-files
|
|
||||||
$loginname = '';
|
|
||||||
if (is_array($row['data'])) {
|
|
||||||
$loginname = $row['data']['loginname'];
|
|
||||||
}
|
|
||||||
$task_desc = $lng['tasks']['backup_customerfiles'];
|
|
||||||
$task_desc = str_replace('%loginname%', $loginname, $task_desc);
|
|
||||||
} elseif ($row['type'] == '99') {
|
|
||||||
// re-generating of cron.d-file
|
|
||||||
$task_desc = $lng['tasks']['regenerating_crond'];
|
|
||||||
} else {
|
} else {
|
||||||
// unknown
|
// unknown
|
||||||
$task_desc = "ERROR: Unknown task type '" . $row['type'] . "'";
|
$task_desc = "ERROR: Unknown task type '" . $row['type'] . "'";
|
||||||
|
|||||||
@@ -269,7 +269,7 @@ class HTML
|
|||||||
}
|
}
|
||||||
|
|
||||||
$text = strtr($text, array(
|
$text = strtr($text, array(
|
||||||
'%s' => $targetname
|
'%s' => htmlspecialchars($targetname)
|
||||||
));
|
));
|
||||||
eval("echo \"" . Template::getTemplate('misc/question_yesno', '1') . "\";");
|
eval("echo \"" . Template::getTemplate('misc/question_yesno', '1') . "\";");
|
||||||
exit();
|
exit();
|
||||||
@@ -302,7 +302,7 @@ class HTML
|
|||||||
}
|
}
|
||||||
|
|
||||||
$text = strtr($text, array(
|
$text = strtr($text, array(
|
||||||
'%s' => $targetname
|
'%s' => htmlspecialchars($targetname)
|
||||||
));
|
));
|
||||||
eval("echo \"" . Template::getTemplate('misc/question_yesno_checkbox', '1') . "\";");
|
eval("echo \"" . Template::getTemplate('misc/question_yesno_checkbox', '1') . "\";");
|
||||||
exit();
|
exit();
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ class Validate
|
|||||||
|
|
||||||
const REGEX_CONF_TEXT = '/^[^\0]*$/';
|
const REGEX_CONF_TEXT = '/^[^\0]*$/';
|
||||||
|
|
||||||
|
const REGEX_DESC_TEXT = '/^[^\0\r\n<>]*$/';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validates the given string by matching against the pattern, prints an error on failure and exits
|
* Validates the given string by matching against the pattern, prints an error on failure and exits
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -4545,12 +4545,6 @@ UPLOADGID=
|
|||||||
</service>
|
</service>
|
||||||
<!-- System tools/services -->
|
<!-- System tools/services -->
|
||||||
<service type="system" title="{{lng.admin.configfiles.etc}}">
|
<service type="system" title="{{lng.admin.configfiles.etc}}">
|
||||||
<!-- Cronjob -->
|
|
||||||
<daemon name="cron" title="Cronjob for froxlor"
|
|
||||||
mandatory="true">
|
|
||||||
<command><![CDATA[/usr/bin/php <BASE_PATH>scripts/froxlor_master_cronjob.php --run-task 99]]></command>
|
|
||||||
<command><![CDATA[{{settings.system.crondreload}}]]></command>
|
|
||||||
</daemon>
|
|
||||||
<!-- AWstats -->
|
<!-- AWstats -->
|
||||||
<daemon name="awstats"
|
<daemon name="awstats"
|
||||||
title="Awstats (webalizer alternative)">
|
title="Awstats (webalizer alternative)">
|
||||||
@@ -4678,6 +4672,12 @@ aliases: files
|
|||||||
dirty work -->
|
dirty work -->
|
||||||
<command><![CDATA[php {{const.install_dir}}scripts/froxlor_master_cronjob.php --force]]></command>
|
<command><![CDATA[php {{const.install_dir}}scripts/froxlor_master_cronjob.php --force]]></command>
|
||||||
</daemon>
|
</daemon>
|
||||||
|
<!-- Cronjob -->
|
||||||
|
<daemon name="cron" title="Cronjob for froxlor"
|
||||||
|
mandatory="true">
|
||||||
|
<command><![CDATA[/usr/bin/php <BASE_PATH>scripts/froxlor_master_cronjob.php --run-task 99]]></command>
|
||||||
|
<command><![CDATA[{{settings.system.crondreload}}]]></command>
|
||||||
|
</daemon>
|
||||||
</service>
|
</service>
|
||||||
</services>
|
</services>
|
||||||
</distribution>
|
</distribution>
|
||||||
|
|||||||
@@ -4756,12 +4756,6 @@ UPLOADGID=
|
|||||||
</service>
|
</service>
|
||||||
<!-- System tools/services -->
|
<!-- System tools/services -->
|
||||||
<service type="system" title="{{lng.admin.configfiles.etc}}">
|
<service type="system" title="{{lng.admin.configfiles.etc}}">
|
||||||
<!-- Cronjob -->
|
|
||||||
<daemon name="cron" title="Cronjob for froxlor"
|
|
||||||
mandatory="true">
|
|
||||||
<command><![CDATA[/usr/bin/php <BASE_PATH>scripts/froxlor_master_cronjob.php --run-task 99]]></command>
|
|
||||||
<command><![CDATA[{{settings.system.crondreload}}]]></command>
|
|
||||||
</daemon>
|
|
||||||
<!-- AWstats -->
|
<!-- AWstats -->
|
||||||
<daemon name="awstats"
|
<daemon name="awstats"
|
||||||
title="Awstats (webalizer alternative)">
|
title="Awstats (webalizer alternative)">
|
||||||
@@ -4889,6 +4883,12 @@ aliases: files
|
|||||||
dirty work -->
|
dirty work -->
|
||||||
<command><![CDATA[php {{const.install_dir}}scripts/froxlor_master_cronjob.php --force]]></command>
|
<command><![CDATA[php {{const.install_dir}}scripts/froxlor_master_cronjob.php --force]]></command>
|
||||||
</daemon>
|
</daemon>
|
||||||
|
<!-- Cronjob -->
|
||||||
|
<daemon name="cron" title="Cronjob for froxlor"
|
||||||
|
mandatory="true">
|
||||||
|
<command><![CDATA[/usr/bin/php <BASE_PATH>scripts/froxlor_master_cronjob.php --run-task 99]]></command>
|
||||||
|
<command><![CDATA[{{settings.system.crondreload}}]]></command>
|
||||||
|
</daemon>
|
||||||
</service>
|
</service>
|
||||||
</services>
|
</services>
|
||||||
</distribution>
|
</distribution>
|
||||||
|
|||||||
@@ -4747,12 +4747,6 @@ UPLOADGID=
|
|||||||
</service>
|
</service>
|
||||||
<!-- System tools/services -->
|
<!-- System tools/services -->
|
||||||
<service type="system" title="{{lng.admin.configfiles.etc}}">
|
<service type="system" title="{{lng.admin.configfiles.etc}}">
|
||||||
<!-- Cronjob -->
|
|
||||||
<daemon name="cron" title="Cronjob for froxlor"
|
|
||||||
mandatory="true">
|
|
||||||
<command><![CDATA[/usr/bin/php <BASE_PATH>scripts/froxlor_master_cronjob.php --run-task 99]]></command>
|
|
||||||
<command><![CDATA[{{settings.system.crondreload}}]]></command>
|
|
||||||
</daemon>
|
|
||||||
<!-- AWstats -->
|
<!-- AWstats -->
|
||||||
<daemon name="awstats"
|
<daemon name="awstats"
|
||||||
title="Awstats (webalizer alternative)">
|
title="Awstats (webalizer alternative)">
|
||||||
@@ -4880,6 +4874,12 @@ aliases: files
|
|||||||
dirty work -->
|
dirty work -->
|
||||||
<command><![CDATA[php {{const.install_dir}}scripts/froxlor_master_cronjob.php --force]]></command>
|
<command><![CDATA[php {{const.install_dir}}scripts/froxlor_master_cronjob.php --force]]></command>
|
||||||
</daemon>
|
</daemon>
|
||||||
|
<!-- Cronjob -->
|
||||||
|
<daemon name="cron" title="Cronjob for froxlor"
|
||||||
|
mandatory="true">
|
||||||
|
<command><![CDATA[/usr/bin/php <BASE_PATH>scripts/froxlor_master_cronjob.php --run-task 99]]></command>
|
||||||
|
<command><![CDATA[{{settings.system.crondreload}}]]></command>
|
||||||
|
</daemon>
|
||||||
</service>
|
</service>
|
||||||
</services>
|
</services>
|
||||||
</distribution>
|
</distribution>
|
||||||
|
|||||||
@@ -2341,12 +2341,6 @@ ControlsLog /var/log/proftpd/controls.log
|
|||||||
</service>
|
</service>
|
||||||
<!-- System tools/services -->
|
<!-- System tools/services -->
|
||||||
<service type="system" title="{{lng.admin.configfiles.etc}}">
|
<service type="system" title="{{lng.admin.configfiles.etc}}">
|
||||||
<!-- Cronjob -->
|
|
||||||
<daemon name="cron" title="Cronjob for froxlor"
|
|
||||||
mandatory="true">
|
|
||||||
<command><![CDATA[/usr/bin/php <BASE_PATH>scripts/froxlor_master_cronjob.php --run-task 99]]></command>
|
|
||||||
<command><![CDATA[{{settings.system.crondreload}}]]></command>
|
|
||||||
</daemon>
|
|
||||||
<!-- AWstats -->
|
<!-- AWstats -->
|
||||||
<daemon name="awstats"
|
<daemon name="awstats"
|
||||||
title="Awstats (webalizer alternative)">
|
title="Awstats (webalizer alternative)">
|
||||||
@@ -2484,6 +2478,12 @@ aliases: files nisplus
|
|||||||
</content>
|
</content>
|
||||||
</file>
|
</file>
|
||||||
</daemon>
|
</daemon>
|
||||||
|
<!-- Cronjob -->
|
||||||
|
<daemon name="cron" title="Cronjob for froxlor"
|
||||||
|
mandatory="true">
|
||||||
|
<command><![CDATA[/usr/bin/php <BASE_PATH>scripts/froxlor_master_cronjob.php --run-task 99]]></command>
|
||||||
|
<command><![CDATA[{{settings.system.crondreload}}]]></command>
|
||||||
|
</daemon>
|
||||||
</service>
|
</service>
|
||||||
</services>
|
</services>
|
||||||
</distribution>
|
</distribution>
|
||||||
|
|||||||
@@ -2343,12 +2343,6 @@ ControlsLog /var/log/proftpd/controls.log
|
|||||||
</service>
|
</service>
|
||||||
<!-- System tools/services -->
|
<!-- System tools/services -->
|
||||||
<service type="system" title="{{lng.admin.configfiles.etc}}">
|
<service type="system" title="{{lng.admin.configfiles.etc}}">
|
||||||
<!-- Cronjob -->
|
|
||||||
<daemon name="cron" title="Cronjob for froxlor"
|
|
||||||
mandatory="true">
|
|
||||||
<command><![CDATA[/usr/bin/php <BASE_PATH>scripts/froxlor_master_cronjob.php --run-task 99]]></command>
|
|
||||||
<command><![CDATA[{{settings.system.crondreload}}]]></command>
|
|
||||||
</daemon>
|
|
||||||
<!-- AWstats -->
|
<!-- AWstats -->
|
||||||
<daemon name="awstats"
|
<daemon name="awstats"
|
||||||
title="Awstats (webalizer alternative)">
|
title="Awstats (webalizer alternative)">
|
||||||
@@ -2487,6 +2481,12 @@ aliases: files nisplus
|
|||||||
</content>
|
</content>
|
||||||
</file>
|
</file>
|
||||||
</daemon>
|
</daemon>
|
||||||
|
<!-- Cronjob -->
|
||||||
|
<daemon name="cron" title="Cronjob for froxlor"
|
||||||
|
mandatory="true">
|
||||||
|
<command><![CDATA[/usr/bin/php <BASE_PATH>scripts/froxlor_master_cronjob.php --run-task 99]]></command>
|
||||||
|
<command><![CDATA[{{settings.system.crondreload}}]]></command>
|
||||||
|
</daemon>
|
||||||
</service>
|
</service>
|
||||||
</services>
|
</services>
|
||||||
</distribution>
|
</distribution>
|
||||||
|
|||||||
@@ -3961,12 +3961,6 @@ UPLOADGID=
|
|||||||
</service>
|
</service>
|
||||||
<!-- System tools/services -->
|
<!-- System tools/services -->
|
||||||
<service type="system" title="{{lng.admin.configfiles.etc}}">
|
<service type="system" title="{{lng.admin.configfiles.etc}}">
|
||||||
<!-- Cronjob -->
|
|
||||||
<daemon name="cron" title="Cronjob for froxlor"
|
|
||||||
mandatory="true">
|
|
||||||
<command><![CDATA[/usr/bin/php <BASE_PATH>scripts/froxlor_master_cronjob.php --run-task 99]]></command>
|
|
||||||
<command><![CDATA[{{settings.system.crondreload}}]]></command>
|
|
||||||
</daemon>
|
|
||||||
<!-- AWstats -->
|
<!-- AWstats -->
|
||||||
<daemon name="awstats"
|
<daemon name="awstats"
|
||||||
title="Awstats (webalizer alternative)">
|
title="Awstats (webalizer alternative)">
|
||||||
@@ -4102,6 +4096,12 @@ aliases: files
|
|||||||
dirty work -->
|
dirty work -->
|
||||||
<command><![CDATA[php {{const.install_dir}}scripts/froxlor_master_cronjob.php --force]]></command>
|
<command><![CDATA[php {{const.install_dir}}scripts/froxlor_master_cronjob.php --force]]></command>
|
||||||
</daemon>
|
</daemon>
|
||||||
|
<!-- Cronjob -->
|
||||||
|
<daemon name="cron" title="Cronjob for froxlor"
|
||||||
|
mandatory="true">
|
||||||
|
<command><![CDATA[/usr/bin/php <BASE_PATH>scripts/froxlor_master_cronjob.php --run-task 99]]></command>
|
||||||
|
<command><![CDATA[{{settings.system.crondreload}}]]></command>
|
||||||
|
</daemon>
|
||||||
</service>
|
</service>
|
||||||
</services>
|
</services>
|
||||||
</distribution>
|
</distribution>
|
||||||
|
|||||||
@@ -3663,12 +3663,6 @@ account required pam_mysql.so user=<SQL_UNPRIVILEGED_USER> passwd=<SQL_UN
|
|||||||
</service>
|
</service>
|
||||||
<!-- System tools/services -->
|
<!-- System tools/services -->
|
||||||
<service type="system" title="{{lng.admin.configfiles.etc}}">
|
<service type="system" title="{{lng.admin.configfiles.etc}}">
|
||||||
<!-- Cronjob -->
|
|
||||||
<daemon name="cron" title="Cronjob for froxlor"
|
|
||||||
mandatory="true">
|
|
||||||
<command><![CDATA[/usr/bin/php <BASE_PATH>scripts/froxlor_master_cronjob.php --run-task 99]]></command>
|
|
||||||
<command><![CDATA[{{settings.system.crondreload}}]]></command>
|
|
||||||
</daemon>
|
|
||||||
<!-- AWstats -->
|
<!-- AWstats -->
|
||||||
<daemon name="awstats"
|
<daemon name="awstats"
|
||||||
title="Awstats (webalizer alternative)">
|
title="Awstats (webalizer alternative)">
|
||||||
@@ -3875,6 +3869,12 @@ aliases: files
|
|||||||
dirty work -->
|
dirty work -->
|
||||||
<command><![CDATA[php {{const.install_dir}}scripts/froxlor_master_cronjob.php --force]]></command>
|
<command><![CDATA[php {{const.install_dir}}scripts/froxlor_master_cronjob.php --force]]></command>
|
||||||
</daemon>
|
</daemon>
|
||||||
|
<!-- Cronjob -->
|
||||||
|
<daemon name="cron" title="Cronjob for froxlor"
|
||||||
|
mandatory="true">
|
||||||
|
<command><![CDATA[/usr/bin/php <BASE_PATH>scripts/froxlor_master_cronjob.php --run-task 99]]></command>
|
||||||
|
<command><![CDATA[{{settings.system.crondreload}}]]></command>
|
||||||
|
</daemon>
|
||||||
</service>
|
</service>
|
||||||
</services>
|
</services>
|
||||||
</distribution>
|
</distribution>
|
||||||
|
|||||||
@@ -4534,12 +4534,6 @@ UPLOADGID=
|
|||||||
</service>
|
</service>
|
||||||
<!-- System tools/services -->
|
<!-- System tools/services -->
|
||||||
<service type="system" title="{{lng.admin.configfiles.etc}}">
|
<service type="system" title="{{lng.admin.configfiles.etc}}">
|
||||||
<!-- Cronjob -->
|
|
||||||
<daemon name="cron" title="Cronjob for froxlor"
|
|
||||||
mandatory="true">
|
|
||||||
<command><![CDATA[/usr/bin/php <BASE_PATH>scripts/froxlor_master_cronjob.php --run-task 99]]></command>
|
|
||||||
<command><![CDATA[{{settings.system.crondreload}}]]></command>
|
|
||||||
</daemon>
|
|
||||||
<!-- AWstats -->
|
<!-- AWstats -->
|
||||||
<daemon name="awstats"
|
<daemon name="awstats"
|
||||||
title="Awstats (webalizer alternative)">
|
title="Awstats (webalizer alternative)">
|
||||||
@@ -4667,6 +4661,12 @@ aliases: files
|
|||||||
dirty work -->
|
dirty work -->
|
||||||
<command><![CDATA[php {{const.install_dir}}scripts/froxlor_master_cronjob.php --force]]></command>
|
<command><![CDATA[php {{const.install_dir}}scripts/froxlor_master_cronjob.php --force]]></command>
|
||||||
</daemon>
|
</daemon>
|
||||||
|
<!-- Cronjob -->
|
||||||
|
<daemon name="cron" title="Cronjob for froxlor"
|
||||||
|
mandatory="true">
|
||||||
|
<command><![CDATA[/usr/bin/php <BASE_PATH>scripts/froxlor_master_cronjob.php --run-task 99]]></command>
|
||||||
|
<command><![CDATA[{{settings.system.crondreload}}]]></command>
|
||||||
|
</daemon>
|
||||||
</service>
|
</service>
|
||||||
</services>
|
</services>
|
||||||
</distribution>
|
</distribution>
|
||||||
|
|||||||
@@ -4545,12 +4545,6 @@ UPLOADGID=
|
|||||||
</service>
|
</service>
|
||||||
<!-- System tools/services -->
|
<!-- System tools/services -->
|
||||||
<service type="system" title="{{lng.admin.configfiles.etc}}">
|
<service type="system" title="{{lng.admin.configfiles.etc}}">
|
||||||
<!-- Cronjob -->
|
|
||||||
<daemon name="cron" title="Cronjob for froxlor"
|
|
||||||
mandatory="true">
|
|
||||||
<command><![CDATA[/usr/bin/php <BASE_PATH>scripts/froxlor_master_cronjob.php --run-task 99]]></command>
|
|
||||||
<command><![CDATA[{{settings.system.crondreload}}]]></command>
|
|
||||||
</daemon>
|
|
||||||
<!-- AWstats -->
|
<!-- AWstats -->
|
||||||
<daemon name="awstats"
|
<daemon name="awstats"
|
||||||
title="Awstats (webalizer alternative)">
|
title="Awstats (webalizer alternative)">
|
||||||
@@ -4678,6 +4672,12 @@ aliases: files
|
|||||||
dirty work -->
|
dirty work -->
|
||||||
<command><![CDATA[php {{const.install_dir}}scripts/froxlor_master_cronjob.php --force]]></command>
|
<command><![CDATA[php {{const.install_dir}}scripts/froxlor_master_cronjob.php --force]]></command>
|
||||||
</daemon>
|
</daemon>
|
||||||
|
<!-- Cronjob -->
|
||||||
|
<daemon name="cron" title="Cronjob for froxlor"
|
||||||
|
mandatory="true">
|
||||||
|
<command><![CDATA[/usr/bin/php <BASE_PATH>scripts/froxlor_master_cronjob.php --run-task 99]]></command>
|
||||||
|
<command><![CDATA[{{settings.system.crondreload}}]]></command>
|
||||||
|
</daemon>
|
||||||
</service>
|
</service>
|
||||||
</services>
|
</services>
|
||||||
</distribution>
|
</distribution>
|
||||||
|
|||||||
@@ -44,7 +44,8 @@ return array(
|
|||||||
'show_element' => (\Froxlor\Settings::Get('api.enabled') == true)
|
'show_element' => (\Froxlor\Settings::Get('api.enabled') == true)
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'url' => 'https://api.froxlor.org/doc/?v='.\Froxlor\Froxlor::getVersion(),
|
'url' => 'https://docs.froxlor.org/apiguide/index.html',
|
||||||
|
'new_window' => true,
|
||||||
'label' => $lng['menue']['main']['apihelp'],
|
'label' => $lng['menue']['main']['apihelp'],
|
||||||
'show_element' => (\Froxlor\Settings::Get('api.enabled') == true)
|
'show_element' => (\Froxlor\Settings::Get('api.enabled') == true)
|
||||||
),
|
),
|
||||||
@@ -195,7 +196,8 @@ return array(
|
|||||||
'show_element' => (\Froxlor\Settings::Get('api.enabled') == true)
|
'show_element' => (\Froxlor\Settings::Get('api.enabled') == true)
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'url' => 'https://api.froxlor.org/doc/?v='.\Froxlor\Froxlor::getVersion(),
|
'url' => 'https://docs.froxlor.org/apiguide/index.html',
|
||||||
|
'new_window' => true,
|
||||||
'label' => $lng['menue']['main']['apihelp'],
|
'label' => $lng['menue']['main']['apihelp'],
|
||||||
'show_element' => (\Froxlor\Settings::Get('api.enabled') == true)
|
'show_element' => (\Froxlor\Settings::Get('api.enabled') == true)
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -954,11 +954,11 @@ $lng['update']['noupdatesavail'] = '<strong>You already have the latest Froxlor
|
|||||||
$lng['admin']['specialsettingsforsubdomains'] = 'Apply specialsettings to all subdomains (*.example.com)';
|
$lng['admin']['specialsettingsforsubdomains'] = 'Apply specialsettings to all subdomains (*.example.com)';
|
||||||
$lng['serversettings']['specialsettingsforsubdomains']['description'] = 'If yes these custom vHost-settings will be added to all subdomains; if no subdomain-specialsettings are being removed.';
|
$lng['serversettings']['specialsettingsforsubdomains']['description'] = 'If yes these custom vHost-settings will be added to all subdomains; if no subdomain-specialsettings are being removed.';
|
||||||
$lng['tasks']['outstanding_tasks'] = 'Outstanding cron-tasks';
|
$lng['tasks']['outstanding_tasks'] = 'Outstanding cron-tasks';
|
||||||
$lng['tasks']['rebuild_webserverconfig'] = 'Rebuilding webserver-configuration';
|
$lng['tasks']['REBUILD_VHOST'] = 'Rebuilding webserver-configuration';
|
||||||
$lng['tasks']['adding_customer'] = 'Adding new customer %loginname%';
|
$lng['tasks']['CREATE_HOME'] = 'Adding new customer %loginname%';
|
||||||
$lng['tasks']['rebuild_bindconfig'] = 'Rebuilding bind-configuration';
|
$lng['tasks']['REBUILD_DNS'] = 'Rebuilding bind-configuration';
|
||||||
$lng['tasks']['creating_ftpdir'] = 'Creating directory for new ftp-user';
|
$lng['tasks']['CREATE_FTP'] = 'Creating directory for new ftp-user';
|
||||||
$lng['tasks']['deleting_customerfiles'] = 'Deleting customer-files %loginname%';
|
$lng['tasks']['DELETE_CUSTOMER_FILES'] = 'Deleting customer-files %loginname%';
|
||||||
$lng['tasks']['noneoutstanding'] = 'There are currently no outstanding tasks for Froxlor';
|
$lng['tasks']['noneoutstanding'] = 'There are currently no outstanding tasks for Froxlor';
|
||||||
|
|
||||||
// ADDED IN FROXLOR 0.9.1
|
// ADDED IN FROXLOR 0.9.1
|
||||||
@@ -1524,7 +1524,7 @@ $lng['serversettings']['diskquota_enabled'] = 'Kvóta aktivována?';
|
|||||||
$lng['serversettings']['diskquota_repquota_path']['description'] = 'Path to repquota';
|
$lng['serversettings']['diskquota_repquota_path']['description'] = 'Path to repquota';
|
||||||
$lng['serversettings']['diskquota_quotatool_path']['description'] = 'Path to quotatool';
|
$lng['serversettings']['diskquota_quotatool_path']['description'] = 'Path to quotatool';
|
||||||
$lng['serversettings']['diskquota_customer_partition']['description'] = 'Partition, on which the customer files are stored';
|
$lng['serversettings']['diskquota_customer_partition']['description'] = 'Partition, on which the customer files are stored';
|
||||||
$lng['tasks']['diskspace_set_quota'] = 'Set quota on filesystem';
|
$lng['tasks']['CREATE_QUOTA'] = 'Set quota on filesystem';
|
||||||
$lng['error']['session_timeout'] = 'Moc nízká hodnota';
|
$lng['error']['session_timeout'] = 'Moc nízká hodnota';
|
||||||
$lng['error']['session_timeout_desc'] = 'You should not set the session timeout lower than 1 minute.';
|
$lng['error']['session_timeout_desc'] = 'You should not set the session timeout lower than 1 minute.';
|
||||||
|
|
||||||
@@ -1554,7 +1554,7 @@ $lng['admin']['speciallogwarning'] = 'WARNING: By changing this setting you will
|
|||||||
// ADDED IN 0.9.28-svn2
|
// ADDED IN 0.9.28-svn2
|
||||||
$lng['serversettings']['vmail_maildirname']['title'] = 'Maildir name';
|
$lng['serversettings']['vmail_maildirname']['title'] = 'Maildir name';
|
||||||
$lng['serversettings']['vmail_maildirname']['description'] = 'Maildir directory into user\'s account. Normally \'Maildir\', in some implementations \'.maildir\', and directly into user\'s directory if left blank.';
|
$lng['serversettings']['vmail_maildirname']['description'] = 'Maildir directory into user\'s account. Normally \'Maildir\', in some implementations \'.maildir\', and directly into user\'s directory if left blank.';
|
||||||
$lng['tasks']['remove_emailacc_files'] = 'Delete customer e-mail data.';
|
$lng['tasks']['DELETE_EMAIL_DATA'] = 'Delete customer e-mail data.';
|
||||||
|
|
||||||
// ADDED IN 0.9.28-svn5
|
// ADDED IN 0.9.28-svn5
|
||||||
$lng['error']['operationnotpermitted'] = 'Operace nepovolena!';
|
$lng['error']['operationnotpermitted'] = 'Operace nepovolena!';
|
||||||
@@ -1683,8 +1683,8 @@ $lng['panel']['ftpdesc'] = 'FTP description';
|
|||||||
$lng['admin']['cronsettings'] = 'Cronjob settings';
|
$lng['admin']['cronsettings'] = 'Cronjob settings';
|
||||||
$lng['serversettings']['system_cronconfig']['title'] = 'Cron configuration file';
|
$lng['serversettings']['system_cronconfig']['title'] = 'Cron configuration file';
|
||||||
$lng['serversettings']['system_cronconfig']['description'] = 'Path to the cron-service configuration-file. This file will be updated regularly and automatically by froxlor.<br />Note: Please <b>be sure</b> to use the same filename as for the main froxlor cronjob (default: /etc/cron.d/froxlor)!<br><br>If you are using <b>FreeBSD</b>, please specify <i>/etc/crontab</i> here!';
|
$lng['serversettings']['system_cronconfig']['description'] = 'Path to the cron-service configuration-file. This file will be updated regularly and automatically by froxlor.<br />Note: Please <b>be sure</b> to use the same filename as for the main froxlor cronjob (default: /etc/cron.d/froxlor)!<br><br>If you are using <b>FreeBSD</b>, please specify <i>/etc/crontab</i> here!';
|
||||||
$lng['tasks']['remove_ftpacc_files'] = 'Delete customer ftp-account data.';
|
$lng['tasks']['DELETE_FTP_DATA'] = 'Delete customer ftp-account data.';
|
||||||
$lng['tasks']['regenerating_crond'] = 'Rebuilding the cron.d-file';
|
$lng['tasks']['REBUILD_CRON'] = 'Rebuilding the cron.d-file';
|
||||||
$lng['serversettings']['system_crondreload']['title'] = 'Cron-daemon reload command';
|
$lng['serversettings']['system_crondreload']['title'] = 'Cron-daemon reload command';
|
||||||
$lng['serversettings']['system_crondreload']['description'] = 'Specify the command to execute in order to reload your systems cron-daemon';
|
$lng['serversettings']['system_crondreload']['description'] = 'Specify the command to execute in order to reload your systems cron-daemon';
|
||||||
$lng['admin']['integritycheck'] = 'Ověření databáze';
|
$lng['admin']['integritycheck'] = 'Ověření databáze';
|
||||||
@@ -1889,7 +1889,7 @@ $lng['serversettings']['backupenabled']['title'] = "Povolit zálohy pro zákazn
|
|||||||
$lng['serversettings']['backupenabled']['description'] = "If activated, the customer will be able to schedule backup jobs (cron-backup) which generates an archive within his docroot (subdirectory chosable by customer)";
|
$lng['serversettings']['backupenabled']['description'] = "If activated, the customer will be able to schedule backup jobs (cron-backup) which generates an archive within his docroot (subdirectory chosable by customer)";
|
||||||
$lng['extras']['path_protection_label'] = '<strong class="red">Important</strong>';
|
$lng['extras']['path_protection_label'] = '<strong class="red">Important</strong>';
|
||||||
$lng['extras']['path_protection_info'] = '<strong class="red">We strongly recommend protecting the given path, see "Extras" -> "Directory protection"</strong>';
|
$lng['extras']['path_protection_info'] = '<strong class="red">We strongly recommend protecting the given path, see "Extras" -> "Directory protection"</strong>';
|
||||||
$lng['tasks']['backup_customerfiles'] = 'Backup job for customer %loginname%';
|
$lng['tasks']['CREATE_CUSTOMER_BACKUP'] = 'Backup job for customer %loginname%';
|
||||||
|
|
||||||
$lng['error']['dns_domain_nodns'] = 'DNS pro tuto doménu je vypnuto';
|
$lng['error']['dns_domain_nodns'] = 'DNS pro tuto doménu je vypnuto';
|
||||||
$lng['error']['dns_content_empty'] = 'No content given';
|
$lng['error']['dns_content_empty'] = 'No content given';
|
||||||
@@ -2032,7 +2032,7 @@ $lng['apikeys']['allowed_from_help'] = 'Comma separated list of ip addresses. De
|
|||||||
$lng['apikeys']['valid_until'] = 'Platné do';
|
$lng['apikeys']['valid_until'] = 'Platné do';
|
||||||
$lng['apikeys']['valid_until_help'] = 'Date until valid, format YYYY-MM-DD';
|
$lng['apikeys']['valid_until_help'] = 'Date until valid, format YYYY-MM-DD';
|
||||||
$lng['serversettings']['enable_api']['title'] = 'Enable external API usage';
|
$lng['serversettings']['enable_api']['title'] = 'Enable external API usage';
|
||||||
$lng['serversettings']['enable_api']['description'] = 'In order to use the froxlor API you need to activate this option. For more detailed information see <a href="https://api.froxlor.org/" target="_new">https://api.froxlor.org/</a>';
|
$lng['serversettings']['enable_api']['description'] = 'In order to use the froxlor API you need to activate this option. For more detailed information see <a href="https://docs.froxlor.org/apiguide/index.html" target="_new">https://docs.froxlor.org/</a>';
|
||||||
$lng['serversettings']['dhparams_file']['title'] = 'DHParams file (Diffie–Hellman key exchange)';
|
$lng['serversettings']['dhparams_file']['title'] = 'DHParams file (Diffie–Hellman key exchange)';
|
||||||
$lng['serversettings']['dhparams_file']['description'] = 'If a dhparams.pem file is specified here it will be included in the webserver configuration. Leave empty to disable.<br>Example: /etc/apache2/ssl/dhparams.pem<br><br>If the file does not exist, it will be created automatically with the following command: <em>openssl dhparam -out /etc/apache2/ssl/dhparams.pem 4096<em>. It is recommended to create the file prior to specifying it here as the creation takes quite a while and blocks the cronjob.';
|
$lng['serversettings']['dhparams_file']['description'] = 'If a dhparams.pem file is specified here it will be included in the webserver configuration. Leave empty to disable.<br>Example: /etc/apache2/ssl/dhparams.pem<br><br>If the file does not exist, it will be created automatically with the following command: <em>openssl dhparam -out /etc/apache2/ssl/dhparams.pem 4096<em>. It is recommended to create the file prior to specifying it here as the creation takes quite a while and blocks the cronjob.';
|
||||||
$lng['2fa']['2fa'] = '2FA možnosti';
|
$lng['2fa']['2fa'] = '2FA možnosti';
|
||||||
@@ -2057,8 +2057,8 @@ $lng['panel']['ihave_configured'] = 'I have configured the services';
|
|||||||
$lng['panel']['system_is_configured'] = 'System is already set as configured';
|
$lng['panel']['system_is_configured'] = 'System is already set as configured';
|
||||||
$lng['panel']['settings_before_configuration'] = 'Please be sure you adjusted the settings prior to configuring the services here';
|
$lng['panel']['settings_before_configuration'] = 'Please be sure you adjusted the settings prior to configuring the services here';
|
||||||
$lng['panel']['alternative_cmdline_config'] = 'Alternatively, just run the following command as root-user in your shell to configure the services automatically';
|
$lng['panel']['alternative_cmdline_config'] = 'Alternatively, just run the following command as root-user in your shell to configure the services automatically';
|
||||||
$lng['tasks']['remove_pdns_domain'] = 'Delete domain %s from PowerDNS database';
|
$lng['tasks']['DELETE_DOMAIN_PDNS'] = 'Delete domain %domain% from PowerDNS database';
|
||||||
$lng['tasks']['remove_ssl_domain'] = 'Delete ssl files of domain %s';
|
$lng['tasks']['DELETE_DOMAIN_SSL'] = 'Delete ssl files of domain %domain%';
|
||||||
$lng['admin']['novhostcontainer'] = '<br><br><small class="red">None of the IPs and ports has the "' . $lng['admin']['ipsandports']['create_vhostcontainer'] . '" option enabled, many settings here will not be available</small>';
|
$lng['admin']['novhostcontainer'] = '<br><br><small class="red">None of the IPs and ports has the "' . $lng['admin']['ipsandports']['create_vhostcontainer'] . '" option enabled, many settings here will not be available</small>';
|
||||||
$lng['serversettings']['errorlog_level']['title'] = 'Error log-level';
|
$lng['serversettings']['errorlog_level']['title'] = 'Error log-level';
|
||||||
$lng['serversettings']['errorlog_level']['description'] = 'Specify the error log level. Default is "warn" for apache-users and "error" for nginx-users.';
|
$lng['serversettings']['errorlog_level']['description'] = 'Specify the error log level. Default is "warn" for apache-users and "error" for nginx-users.';
|
||||||
|
|||||||
@@ -862,11 +862,11 @@ $lng['update']['noupdatesavail'] = '<strong>U gebruikt reeds de meest recente ve
|
|||||||
$lng['admin']['specialsettingsforsubdomains'] = 'Speciale instellingen toepassen op alle subdomeinen (*.example.com)';
|
$lng['admin']['specialsettingsforsubdomains'] = 'Speciale instellingen toepassen op alle subdomeinen (*.example.com)';
|
||||||
$lng['serversettings']['specialsettingsforsubdomains']['description'] = 'Indien "Ja" zullen deze aangepaste VHost-instellingen worden toegepast op alle subdomeinen.';
|
$lng['serversettings']['specialsettingsforsubdomains']['description'] = 'Indien "Ja" zullen deze aangepaste VHost-instellingen worden toegepast op alle subdomeinen.';
|
||||||
$lng['tasks']['outstanding_tasks'] = 'Uitstaande cron-taken';
|
$lng['tasks']['outstanding_tasks'] = 'Uitstaande cron-taken';
|
||||||
$lng['tasks']['rebuild_webserverconfig'] = 'Bezig met opnieuw opbouwen van de configuratie van de webserver';
|
$lng['tasks']['REBUILD_VHOST'] = 'Bezig met opnieuw opbouwen van de configuratie van de webserver';
|
||||||
$lng['tasks']['adding_customer'] = 'Klant met naam %loginname% wordt toegevoegd';
|
$lng['tasks']['CREATE_HOME'] = 'Klant met naam %loginname% wordt toegevoegd';
|
||||||
$lng['tasks']['rebuild_bindconfig'] = 'Opnieuw opbouwen bind-configuratie';
|
$lng['tasks']['REBUILD_DNS'] = 'Opnieuw opbouwen bind-configuratie';
|
||||||
$lng['tasks']['creating_ftpdir'] = 'Map aanmaken voor nieuwe FTP-gebruiker';
|
$lng['tasks']['CREATE_FTP'] = 'Map aanmaken voor nieuwe FTP-gebruiker';
|
||||||
$lng['tasks']['deleting_customerfiles'] = 'Verwijderen klantbestanden van %loginname%';
|
$lng['tasks']['DELETE_CUSTOMER_FILES'] = 'Verwijderen klantbestanden van %loginname%';
|
||||||
$lng['tasks']['noneoutstanding'] = 'Er zijn op dit moment geen uitstaande taken voor Froxlor';
|
$lng['tasks']['noneoutstanding'] = 'Er zijn op dit moment geen uitstaande taken voor Froxlor';
|
||||||
|
|
||||||
// ADDED IN FROXLOR 0.9.1
|
// ADDED IN FROXLOR 0.9.1
|
||||||
|
|||||||
@@ -851,7 +851,7 @@ $lng['admin']['phpconfig']['pear_dir'] = 'Will be replaced with the global setti
|
|||||||
$lng['admin']['phpconfig']['open_basedir_c'] = 'Will insert a ; (semicolon) to comment-out/disable open_basedir when set';
|
$lng['admin']['phpconfig']['open_basedir_c'] = 'Will insert a ; (semicolon) to comment-out/disable open_basedir when set';
|
||||||
$lng['admin']['phpconfig']['open_basedir'] = 'Will be replaced with the open_basedir setting of the domain.';
|
$lng['admin']['phpconfig']['open_basedir'] = 'Will be replaced with the open_basedir setting of the domain.';
|
||||||
$lng['admin']['phpconfig']['tmp_dir'] = 'Will be replaced with the temporary directory of the domain.';
|
$lng['admin']['phpconfig']['tmp_dir'] = 'Will be replaced with the temporary directory of the domain.';
|
||||||
$lng['admin']['phpconfig']['open_basedir_global'] = 'Will be replaced with the global value of the path which will be attached to the open_basedir.';
|
$lng['admin']['phpconfig']['open_basedir_global'] = 'Will be replaced with the global value of the path which will be attached to the open_basedir (see webserver settings).';
|
||||||
$lng['admin']['phpconfig']['customer_email'] = 'Will be replaced with the e-mail address of the customer who owns this domain.';
|
$lng['admin']['phpconfig']['customer_email'] = 'Will be replaced with the e-mail address of the customer who owns this domain.';
|
||||||
$lng['admin']['phpconfig']['admin_email'] = 'Will be replaced with e-mail address of the admin who owns this domain.';
|
$lng['admin']['phpconfig']['admin_email'] = 'Will be replaced with e-mail address of the admin who owns this domain.';
|
||||||
$lng['admin']['phpconfig']['domain'] = 'Will be replaced with the domain.';
|
$lng['admin']['phpconfig']['domain'] = 'Will be replaced with the domain.';
|
||||||
@@ -957,11 +957,11 @@ $lng['update']['noupdatesavail'] = '<strong>You already have the latest Froxlor
|
|||||||
$lng['admin']['specialsettingsforsubdomains'] = 'Apply specialsettings to all subdomains (*.example.com)';
|
$lng['admin']['specialsettingsforsubdomains'] = 'Apply specialsettings to all subdomains (*.example.com)';
|
||||||
$lng['serversettings']['specialsettingsforsubdomains']['description'] = 'If yes these custom vHost-settings will be added to all subdomains; if no subdomain-specialsettings are being removed.';
|
$lng['serversettings']['specialsettingsforsubdomains']['description'] = 'If yes these custom vHost-settings will be added to all subdomains; if no subdomain-specialsettings are being removed.';
|
||||||
$lng['tasks']['outstanding_tasks'] = 'Outstanding cron-tasks';
|
$lng['tasks']['outstanding_tasks'] = 'Outstanding cron-tasks';
|
||||||
$lng['tasks']['rebuild_webserverconfig'] = 'Rebuilding webserver-configuration';
|
$lng['tasks']['REBUILD_VHOST'] = 'Rebuilding webserver-configuration';
|
||||||
$lng['tasks']['adding_customer'] = 'Adding new customer %loginname%';
|
$lng['tasks']['CREATE_HOME'] = 'Adding new customer %loginname%';
|
||||||
$lng['tasks']['rebuild_bindconfig'] = 'Rebuilding bind-configuration';
|
$lng['tasks']['REBUILD_DNS'] = 'Rebuilding bind-configuration';
|
||||||
$lng['tasks']['creating_ftpdir'] = 'Creating directory for new ftp-user';
|
$lng['tasks']['CREATE_FTP'] = 'Creating directory for new ftp-user';
|
||||||
$lng['tasks']['deleting_customerfiles'] = 'Deleting customer-files %loginname%';
|
$lng['tasks']['DELETE_CUSTOMER_FILES'] = 'Deleting customer-files %loginname%';
|
||||||
$lng['tasks']['noneoutstanding'] = 'There are currently no outstanding tasks for Froxlor';
|
$lng['tasks']['noneoutstanding'] = 'There are currently no outstanding tasks for Froxlor';
|
||||||
|
|
||||||
// ADDED IN FROXLOR 0.9.1
|
// ADDED IN FROXLOR 0.9.1
|
||||||
@@ -1527,7 +1527,7 @@ $lng['serversettings']['diskquota_enabled'] = 'Quota activated?';
|
|||||||
$lng['serversettings']['diskquota_repquota_path']['description'] = 'Path to repquota';
|
$lng['serversettings']['diskquota_repquota_path']['description'] = 'Path to repquota';
|
||||||
$lng['serversettings']['diskquota_quotatool_path']['description'] = 'Path to quotatool';
|
$lng['serversettings']['diskquota_quotatool_path']['description'] = 'Path to quotatool';
|
||||||
$lng['serversettings']['diskquota_customer_partition']['description'] = 'Partition, on which the customer files are stored';
|
$lng['serversettings']['diskquota_customer_partition']['description'] = 'Partition, on which the customer files are stored';
|
||||||
$lng['tasks']['diskspace_set_quota'] = 'Set quota on filesystem';
|
$lng['tasks']['CREATE_QUOTA'] = 'Set quota on filesystem';
|
||||||
$lng['error']['session_timeout'] = 'Value too low';
|
$lng['error']['session_timeout'] = 'Value too low';
|
||||||
$lng['error']['session_timeout_desc'] = 'You should not set the session timeout lower than 1 minute.';
|
$lng['error']['session_timeout_desc'] = 'You should not set the session timeout lower than 1 minute.';
|
||||||
|
|
||||||
@@ -1557,7 +1557,7 @@ $lng['admin']['speciallogwarning'] = 'WARNING: By changing this setting you will
|
|||||||
// ADDED IN 0.9.28-svn2
|
// ADDED IN 0.9.28-svn2
|
||||||
$lng['serversettings']['vmail_maildirname']['title'] = 'Maildir name';
|
$lng['serversettings']['vmail_maildirname']['title'] = 'Maildir name';
|
||||||
$lng['serversettings']['vmail_maildirname']['description'] = 'Maildir directory into user\'s account. Normally \'Maildir\', in some implementations \'.maildir\', and directly into user\'s directory if left blank.';
|
$lng['serversettings']['vmail_maildirname']['description'] = 'Maildir directory into user\'s account. Normally \'Maildir\', in some implementations \'.maildir\', and directly into user\'s directory if left blank.';
|
||||||
$lng['tasks']['remove_emailacc_files'] = 'Delete customer e-mail data.';
|
$lng['tasks']['DELETE_EMAIL_DATA'] = 'Delete customer e-mail data.';
|
||||||
|
|
||||||
// ADDED IN 0.9.28-svn5
|
// ADDED IN 0.9.28-svn5
|
||||||
$lng['error']['operationnotpermitted'] = 'Operation not permitted!';
|
$lng['error']['operationnotpermitted'] = 'Operation not permitted!';
|
||||||
@@ -1688,8 +1688,8 @@ $lng['panel']['ftpdesc'] = 'FTP description';
|
|||||||
$lng['admin']['cronsettings'] = 'Cronjob settings';
|
$lng['admin']['cronsettings'] = 'Cronjob settings';
|
||||||
$lng['serversettings']['system_cronconfig']['title'] = 'Cron configuration file';
|
$lng['serversettings']['system_cronconfig']['title'] = 'Cron configuration file';
|
||||||
$lng['serversettings']['system_cronconfig']['description'] = 'Path to the cron-service configuration-file. This file will be updated regularly and automatically by froxlor.<br />Note: Please <b>be sure</b> to use the same filename as for the main froxlor cronjob (default: /etc/cron.d/froxlor)!<br><br>If you are using <b>FreeBSD</b>, please specify <i>/etc/crontab</i> here!';
|
$lng['serversettings']['system_cronconfig']['description'] = 'Path to the cron-service configuration-file. This file will be updated regularly and automatically by froxlor.<br />Note: Please <b>be sure</b> to use the same filename as for the main froxlor cronjob (default: /etc/cron.d/froxlor)!<br><br>If you are using <b>FreeBSD</b>, please specify <i>/etc/crontab</i> here!';
|
||||||
$lng['tasks']['remove_ftpacc_files'] = 'Delete customer ftp-account data.';
|
$lng['tasks']['DELETE_FTP_DATA'] = 'Delete customer ftp-account data.';
|
||||||
$lng['tasks']['regenerating_crond'] = 'Rebuilding the cron.d-file';
|
$lng['tasks']['REBUILD_CRON'] = 'Rebuilding the cron.d-file';
|
||||||
$lng['serversettings']['system_crondreload']['title'] = 'Cron-daemon reload command';
|
$lng['serversettings']['system_crondreload']['title'] = 'Cron-daemon reload command';
|
||||||
$lng['serversettings']['system_crondreload']['description'] = 'Specify the command to execute in order to reload your systems cron-daemon';
|
$lng['serversettings']['system_crondreload']['description'] = 'Specify the command to execute in order to reload your systems cron-daemon';
|
||||||
$lng['admin']['integritycheck'] = 'Database validation';
|
$lng['admin']['integritycheck'] = 'Database validation';
|
||||||
@@ -1894,7 +1894,7 @@ $lng['serversettings']['backupenabled']['title'] = "Enable backup for customers"
|
|||||||
$lng['serversettings']['backupenabled']['description'] = "If activated, the customer will be able to schedule backup jobs (cron-backup) which generates an archive within his docroot (subdirectory chosable by customer)";
|
$lng['serversettings']['backupenabled']['description'] = "If activated, the customer will be able to schedule backup jobs (cron-backup) which generates an archive within his docroot (subdirectory chosable by customer)";
|
||||||
$lng['extras']['path_protection_label'] = '<strong class="red">Important</strong>';
|
$lng['extras']['path_protection_label'] = '<strong class="red">Important</strong>';
|
||||||
$lng['extras']['path_protection_info'] = '<strong class="red">We strongly recommend protecting the given path, see "Extras" -> "Directory protection"</strong>';
|
$lng['extras']['path_protection_info'] = '<strong class="red">We strongly recommend protecting the given path, see "Extras" -> "Directory protection"</strong>';
|
||||||
$lng['tasks']['backup_customerfiles'] = 'Backup job for customer %loginname%';
|
$lng['tasks']['CREATE_CUSTOMER_BACKUP'] = 'Backup job for customer %loginname%';
|
||||||
|
|
||||||
$lng['error']['dns_domain_nodns'] = 'DNS is not enabled for this domain';
|
$lng['error']['dns_domain_nodns'] = 'DNS is not enabled for this domain';
|
||||||
$lng['error']['dns_content_empty'] = 'No content given';
|
$lng['error']['dns_content_empty'] = 'No content given';
|
||||||
@@ -2038,7 +2038,7 @@ $lng['apikeys']['allowed_from_help'] = 'Comma separated list of ip addresses. De
|
|||||||
$lng['apikeys']['valid_until'] = 'Valid until';
|
$lng['apikeys']['valid_until'] = 'Valid until';
|
||||||
$lng['apikeys']['valid_until_help'] = 'Date until valid, format YYYY-MM-DD';
|
$lng['apikeys']['valid_until_help'] = 'Date until valid, format YYYY-MM-DD';
|
||||||
$lng['serversettings']['enable_api']['title'] = 'Enable external API usage';
|
$lng['serversettings']['enable_api']['title'] = 'Enable external API usage';
|
||||||
$lng['serversettings']['enable_api']['description'] = 'In order to use the froxlor API you need to activate this option. For more detailed information see <a href="https://api.froxlor.org/" target="_new">https://api.froxlor.org/</a>';
|
$lng['serversettings']['enable_api']['description'] = 'In order to use the froxlor API you need to activate this option. For more detailed information see <a href="https://docs.froxlor.org/apiguide/index.html" target="_new">https://docs.froxlor.org/</a>';
|
||||||
$lng['serversettings']['dhparams_file']['title'] = 'DHParams file (Diffie–Hellman key exchange)';
|
$lng['serversettings']['dhparams_file']['title'] = 'DHParams file (Diffie–Hellman key exchange)';
|
||||||
$lng['serversettings']['dhparams_file']['description'] = 'If a dhparams.pem file is specified here it will be included in the webserver configuration. Leave empty to disable.<br>Example: /etc/ssl/webserver/dhparams.pem<br><br>If the file does not exist, it will be created automatically with the following command: <em>openssl dhparam -out /etc/ssl/webserver/dhparams.pem 4096<em>. It is recommended to create the file prior to specifying it here as the creation takes quite a while and blocks the cronjob.';
|
$lng['serversettings']['dhparams_file']['description'] = 'If a dhparams.pem file is specified here it will be included in the webserver configuration. Leave empty to disable.<br>Example: /etc/ssl/webserver/dhparams.pem<br><br>If the file does not exist, it will be created automatically with the following command: <em>openssl dhparam -out /etc/ssl/webserver/dhparams.pem 4096<em>. It is recommended to create the file prior to specifying it here as the creation takes quite a while and blocks the cronjob.';
|
||||||
$lng['2fa']['2fa'] = '2FA options';
|
$lng['2fa']['2fa'] = '2FA options';
|
||||||
@@ -2063,8 +2063,8 @@ $lng['panel']['ihave_configured'] = 'I have configured the services';
|
|||||||
$lng['panel']['system_is_configured'] = 'System is already set as configured';
|
$lng['panel']['system_is_configured'] = 'System is already set as configured';
|
||||||
$lng['panel']['settings_before_configuration'] = 'Please be sure you adjusted the settings prior to configuring the services here';
|
$lng['panel']['settings_before_configuration'] = 'Please be sure you adjusted the settings prior to configuring the services here';
|
||||||
$lng['panel']['alternative_cmdline_config'] = 'Alternatively, just run the following command as root-user in your shell to configure the services automatically';
|
$lng['panel']['alternative_cmdline_config'] = 'Alternatively, just run the following command as root-user in your shell to configure the services automatically';
|
||||||
$lng['tasks']['remove_pdns_domain'] = 'Delete domain %s from PowerDNS database';
|
$lng['tasks']['DELETE_DOMAIN_PDNS'] = 'Delete domain %domain% from PowerDNS database';
|
||||||
$lng['tasks']['remove_ssl_domain'] = 'Delete ssl files of domain %s';
|
$lng['tasks']['DELETE_DOMAIN_SSL'] = 'Delete ssl files of domain %domain%';
|
||||||
$lng['admin']['novhostcontainer'] = '<br><br><small class="red">None of the IPs and ports has the "' . $lng['admin']['ipsandports']['create_vhostcontainer'] . '" option enabled, many settings here will not be available</small>';
|
$lng['admin']['novhostcontainer'] = '<br><br><small class="red">None of the IPs and ports has the "' . $lng['admin']['ipsandports']['create_vhostcontainer'] . '" option enabled, many settings here will not be available</small>';
|
||||||
$lng['serversettings']['errorlog_level']['title'] = 'Error log-level';
|
$lng['serversettings']['errorlog_level']['title'] = 'Error log-level';
|
||||||
$lng['serversettings']['errorlog_level']['description'] = 'Specify the error log level. Default is "warn" for apache-users and "error" for nginx-users.';
|
$lng['serversettings']['errorlog_level']['description'] = 'Specify the error log level. Default is "warn" for apache-users and "error" for nginx-users.';
|
||||||
|
|||||||
@@ -843,7 +843,7 @@ $lng['admin']['phpconfig']['pear_dir'] = 'Wird mit dem globalen Wert für das In
|
|||||||
$lng['admin']['phpconfig']['open_basedir_c'] = 'Wird mit einem ; (Semikolon) ersetzt, um open_basedir auszukommentieren/deaktivieren, wenn eingestellt.';
|
$lng['admin']['phpconfig']['open_basedir_c'] = 'Wird mit einem ; (Semikolon) ersetzt, um open_basedir auszukommentieren/deaktivieren, wenn eingestellt.';
|
||||||
$lng['admin']['phpconfig']['open_basedir'] = 'Wird mit der open_basedir-Einstellung der Domain ersetzt.';
|
$lng['admin']['phpconfig']['open_basedir'] = 'Wird mit der open_basedir-Einstellung der Domain ersetzt.';
|
||||||
$lng['admin']['phpconfig']['tmp_dir'] = 'Wird mit der Einstellung für das temporäre Verzeichnis der Domain ersetzt.';
|
$lng['admin']['phpconfig']['tmp_dir'] = 'Wird mit der Einstellung für das temporäre Verzeichnis der Domain ersetzt.';
|
||||||
$lng['admin']['phpconfig']['open_basedir_global'] = 'Wird mit der globalen Einstellung des Pfades ersetzt, der dem open_basedir hinzugefügt wird.';
|
$lng['admin']['phpconfig']['open_basedir_global'] = 'Wird mit der globalen Einstellung des Pfades ersetzt, der dem open_basedir hinzugefügt wird (siehe Webserver Einstellungen).';
|
||||||
$lng['admin']['phpconfig']['customer_email'] = 'Wird mit der E-Mail-Adresse des Kunden ersetzt, dem die Domain gehört.';
|
$lng['admin']['phpconfig']['customer_email'] = 'Wird mit der E-Mail-Adresse des Kunden ersetzt, dem die Domain gehört.';
|
||||||
$lng['admin']['phpconfig']['admin_email'] = 'Wird mit der E-Mail-Adresse des Admins ersetzt, dem die Domain gehört.';
|
$lng['admin']['phpconfig']['admin_email'] = 'Wird mit der E-Mail-Adresse des Admins ersetzt, dem die Domain gehört.';
|
||||||
$lng['admin']['phpconfig']['domain'] = 'Wird mit der Domain ersetzt.';
|
$lng['admin']['phpconfig']['domain'] = 'Wird mit der Domain ersetzt.';
|
||||||
@@ -928,11 +928,11 @@ $lng['update']['noupdatesavail'] = '<strong>Ihre Froxlor-Version ist aktuell.</s
|
|||||||
$lng['admin']['specialsettingsforsubdomains'] = 'Übernehme Einstellungen für alle Subdomains (*.beispiel.de)';
|
$lng['admin']['specialsettingsforsubdomains'] = 'Übernehme Einstellungen für alle Subdomains (*.beispiel.de)';
|
||||||
$lng['serversettings']['specialsettingsforsubdomains']['description'] = 'Wenn ja, werden die individuellen Einstellungen für alle Subdomains übernommen.<br />Wenn nein, werden Subdomain-Specialsettings entfernt.';
|
$lng['serversettings']['specialsettingsforsubdomains']['description'] = 'Wenn ja, werden die individuellen Einstellungen für alle Subdomains übernommen.<br />Wenn nein, werden Subdomain-Specialsettings entfernt.';
|
||||||
$lng['tasks']['outstanding_tasks'] = 'Ausstehende Cron-Aufgaben';
|
$lng['tasks']['outstanding_tasks'] = 'Ausstehende Cron-Aufgaben';
|
||||||
$lng['tasks']['rebuild_webserverconfig'] = 'Neuerstellung der Webserver-Konfiguration';
|
$lng['tasks']['REBUILD_VHOST'] = 'Neuerstellung der Webserver-Konfiguration';
|
||||||
$lng['tasks']['adding_customer'] = 'Erstelle neuen Kunden %loginname%';
|
$lng['tasks']['CREATE_HOME'] = 'Erstelle neuen Kunden %loginname%';
|
||||||
$lng['tasks']['rebuild_bindconfig'] = 'Neuerstellung der Bind-Konfiguration';
|
$lng['tasks']['REBUILD_DNS'] = 'Neuerstellung der Bind-Konfiguration';
|
||||||
$lng['tasks']['creating_ftpdir'] = 'Erstelle Verzeichnis für neuen FTP-Benutzer';
|
$lng['tasks']['CREATE_FTP'] = 'Erstelle Verzeichnis für neuen FTP-Benutzer';
|
||||||
$lng['tasks']['deleting_customerfiles'] = 'Löschen von Kunden-Dateien %loginname%';
|
$lng['tasks']['DELETE_CUSTOMER_FILES'] = 'Löschen von Kunden-Dateien %loginname%';
|
||||||
$lng['tasks']['noneoutstanding'] = 'Zur Zeit gibt es keine ausstehenden Aufgaben für Froxlor';
|
$lng['tasks']['noneoutstanding'] = 'Zur Zeit gibt es keine ausstehenden Aufgaben für Froxlor';
|
||||||
|
|
||||||
// ADDED IN FROXLOR 0.9.1
|
// ADDED IN FROXLOR 0.9.1
|
||||||
@@ -1252,7 +1252,7 @@ $lng['serversettings']['diskquota_enabled'] = 'Quota aktiviert?';
|
|||||||
$lng['serversettings']['diskquota_repquota_path']['description'] = 'Pfad zu repquota';
|
$lng['serversettings']['diskquota_repquota_path']['description'] = 'Pfad zu repquota';
|
||||||
$lng['serversettings']['diskquota_quotatool_path']['description'] = 'Pfad zu quotatool';
|
$lng['serversettings']['diskquota_quotatool_path']['description'] = 'Pfad zu quotatool';
|
||||||
$lng['serversettings']['diskquota_customer_partition']['description'] = 'Partition, auf welcher die Kundendaten liegen';
|
$lng['serversettings']['diskquota_customer_partition']['description'] = 'Partition, auf welcher die Kundendaten liegen';
|
||||||
$lng['tasks']['diskspace_set_quota'] = 'Quota auf dem Dateisystem setzen';
|
$lng['tasks']['CREATE_QUOTA'] = 'Quota auf dem Dateisystem setzen';
|
||||||
$lng['error']['session_timeout'] = 'Wert zu niedrig';
|
$lng['error']['session_timeout'] = 'Wert zu niedrig';
|
||||||
$lng['error']['session_timeout_desc'] = 'Der Wert der Session-Timeout sollte nicht unter einer Minute liegen.';
|
$lng['error']['session_timeout_desc'] = 'Der Wert der Session-Timeout sollte nicht unter einer Minute liegen.';
|
||||||
|
|
||||||
@@ -1281,7 +1281,7 @@ $lng['admin']['speciallogwarning'] = 'ACHTUNG: Durch diese Einstellungen werden
|
|||||||
// ADDED IN 0.9.28-svn2
|
// ADDED IN 0.9.28-svn2
|
||||||
$lng['serversettings']['vmail_maildirname']['title'] = 'Maildir-(Unter-)Ordner';
|
$lng['serversettings']['vmail_maildirname']['title'] = 'Maildir-(Unter-)Ordner';
|
||||||
$lng['serversettings']['vmail_maildirname']['description'] = 'Der Maildir-Ordner innerhalb des Kontos des Benutzers (normalerweise \'Maildir\', in manchen Fällen auch \'.maildir\'). Sollen die E-Mails direkt in das Verzeichnis, diese Option leer lassen.';
|
$lng['serversettings']['vmail_maildirname']['description'] = 'Der Maildir-Ordner innerhalb des Kontos des Benutzers (normalerweise \'Maildir\', in manchen Fällen auch \'.maildir\'). Sollen die E-Mails direkt in das Verzeichnis, diese Option leer lassen.';
|
||||||
$lng['tasks']['remove_emailacc_files'] = 'E-Mail-Dateien des Kunden löschen';
|
$lng['tasks']['DELETE_EMAIL_DATA'] = 'E-Mail-Dateien des Kunden löschen';
|
||||||
|
|
||||||
// ADDED IN 0.9.28-svn5
|
// ADDED IN 0.9.28-svn5
|
||||||
$lng['error']['operationnotpermitted'] = 'Diese Aktion ist nicht erlaubt!';
|
$lng['error']['operationnotpermitted'] = 'Diese Aktion ist nicht erlaubt!';
|
||||||
@@ -1411,8 +1411,8 @@ $lng['panel']['ftpdesc'] = 'FTP-Beschreibung';
|
|||||||
$lng['admin']['cronsettings'] = 'Cronjob-Einstellungen';
|
$lng['admin']['cronsettings'] = 'Cronjob-Einstellungen';
|
||||||
$lng['serversettings']['system_cronconfig']['title'] = 'Cron-Konfigurationsdatei';
|
$lng['serversettings']['system_cronconfig']['title'] = 'Cron-Konfigurationsdatei';
|
||||||
$lng['serversettings']['system_cronconfig']['description'] = 'Pfad zur Konfigurationsdatei des Cron-Dienstes. Diese Datei wird von Froxlor automatisch aktualisiert.<br />Hinweis: Bitte verwenden Sie <strong>exakt</strong> die gleiche Datei wie für den Froxlor-Haupt-Cronjob (Standard: /etc/cron.d/froxlor)!<br><br>Wird <b>FreeBSD</b> verwendet, sollte hier <i>/etc/crontab</i> angegeben werden!';
|
$lng['serversettings']['system_cronconfig']['description'] = 'Pfad zur Konfigurationsdatei des Cron-Dienstes. Diese Datei wird von Froxlor automatisch aktualisiert.<br />Hinweis: Bitte verwenden Sie <strong>exakt</strong> die gleiche Datei wie für den Froxlor-Haupt-Cronjob (Standard: /etc/cron.d/froxlor)!<br><br>Wird <b>FreeBSD</b> verwendet, sollte hier <i>/etc/crontab</i> angegeben werden!';
|
||||||
$lng['tasks']['remove_ftpacc_files'] = 'Kunden FTP-Konto Dateien löschen';
|
$lng['tasks']['DELETE_FTP_DATA'] = 'Kunden FTP-Konto Dateien löschen';
|
||||||
$lng['tasks']['regenerating_crond'] = 'Neuerstellung der cron.d-Datei';
|
$lng['tasks']['REBUILD_CRON'] = 'Neuerstellung der cron.d-Datei';
|
||||||
$lng['serversettings']['system_crondreload']['title'] = 'Cron-Daemon reload Befehl';
|
$lng['serversettings']['system_crondreload']['title'] = 'Cron-Daemon reload Befehl';
|
||||||
$lng['serversettings']['system_crondreload']['description'] = 'Geben Sie hier den Befehl zum Neuladen des Cron-Daemons an';
|
$lng['serversettings']['system_crondreload']['description'] = 'Geben Sie hier den Befehl zum Neuladen des Cron-Daemons an';
|
||||||
$lng['admin']['integritycheck'] = 'Datenbankprüfung';
|
$lng['admin']['integritycheck'] = 'Datenbankprüfung';
|
||||||
@@ -1544,7 +1544,7 @@ $lng['serversettings']['backupenabled']['title'] = "Backup für Kunden aktiviere
|
|||||||
$lng['serversettings']['backupenabled']['description'] = "Wenn dies aktiviert ist, kann der Kunde Sicherungen planen (cron-backup) welche ein Archiv in sein Heimatverzeichnis ablegt (Unterordner vom Kunden wählbar)";
|
$lng['serversettings']['backupenabled']['description'] = "Wenn dies aktiviert ist, kann der Kunde Sicherungen planen (cron-backup) welche ein Archiv in sein Heimatverzeichnis ablegt (Unterordner vom Kunden wählbar)";
|
||||||
$lng['extras']['path_protection_label'] = '<strong class="red">Wichtig</strong>';
|
$lng['extras']['path_protection_label'] = '<strong class="red">Wichtig</strong>';
|
||||||
$lng['extras']['path_protection_info'] = '<strong class="red">Wir raten dringend dazu den angegebenen Pfad zu schützen, siehe "Extras" -> "Verzeichnisschutz"</strong>';
|
$lng['extras']['path_protection_info'] = '<strong class="red">Wir raten dringend dazu den angegebenen Pfad zu schützen, siehe "Extras" -> "Verzeichnisschutz"</strong>';
|
||||||
$lng['tasks']['backup_customerfiles'] = 'Datensicherung für Kunde %loginname%';
|
$lng['tasks']['CREATE_CUSTOMER_BACKUP'] = 'Datensicherung für Kunde %loginname%';
|
||||||
|
|
||||||
$lng['error']['dns_domain_nodns'] = 'DNS ist für diese Domain nicht aktiviert';
|
$lng['error']['dns_domain_nodns'] = 'DNS ist für diese Domain nicht aktiviert';
|
||||||
$lng['error']['dns_content_empty'] = 'Keinen Inhalt angegeben';
|
$lng['error']['dns_content_empty'] = 'Keinen Inhalt angegeben';
|
||||||
@@ -1684,7 +1684,7 @@ $lng['apikeys']['allowed_from_help'] = 'Komma getrennte Liste von IPs. Standard
|
|||||||
$lng['apikeys']['valid_until'] = 'Gültig bis';
|
$lng['apikeys']['valid_until'] = 'Gültig bis';
|
||||||
$lng['apikeys']['valid_until_help'] = 'Datum Gültigkeitsende, Format JJJJ-MM-TT';
|
$lng['apikeys']['valid_until_help'] = 'Datum Gültigkeitsende, Format JJJJ-MM-TT';
|
||||||
$lng['serversettings']['enable_api']['title'] = 'Aktiviere externe API Nutzung';
|
$lng['serversettings']['enable_api']['title'] = 'Aktiviere externe API Nutzung';
|
||||||
$lng['serversettings']['enable_api']['description'] = 'Um die froxlor API nutzen zu können, muss diese Option aktiviert sein. Für detaillierte Informationen siehe <a href="https://api.froxlor.org/" target="_new">https://api.froxlor.org/</a>';
|
$lng['serversettings']['enable_api']['description'] = 'Um die froxlor API nutzen zu können, muss diese Option aktiviert sein. Für detaillierte Informationen siehe <a href="https://docs.froxlor.org/apiguide/index.html" target="_new">https://docs.froxlor.org/</a>';
|
||||||
$lng['serversettings']['dhparams_file']['title'] = 'DHParams Datei (Diffie–Hellman key exchange)';
|
$lng['serversettings']['dhparams_file']['title'] = 'DHParams Datei (Diffie–Hellman key exchange)';
|
||||||
$lng['serversettings']['dhparams_file']['description'] = 'Wird eine dhparams.pem Datei hier angegeben, wir sie in die Webserver Konfiguration mit eingefügt.<br>Beispiel: /etc/ssl/webserver/dhparams.pem<br><br>Existiert die Datei nicht, wird sie wie folgt erstellt: <em>openssl dhparam -out /etc/ssl/webserver/dhparams.pem 4096<em>. Es wird empfohlen die Datei zu erstellen, bevor sie hier angegeben wird, da die Erstellung längere Zeit in Anspruch nimmt und den Cronjob blockiert.';
|
$lng['serversettings']['dhparams_file']['description'] = 'Wird eine dhparams.pem Datei hier angegeben, wir sie in die Webserver Konfiguration mit eingefügt.<br>Beispiel: /etc/ssl/webserver/dhparams.pem<br><br>Existiert die Datei nicht, wird sie wie folgt erstellt: <em>openssl dhparam -out /etc/ssl/webserver/dhparams.pem 4096<em>. Es wird empfohlen die Datei zu erstellen, bevor sie hier angegeben wird, da die Erstellung längere Zeit in Anspruch nimmt und den Cronjob blockiert.';
|
||||||
$lng['2fa']['2fa'] = '2FA Optionen';
|
$lng['2fa']['2fa'] = '2FA Optionen';
|
||||||
@@ -1709,8 +1709,8 @@ $lng['panel']['ihave_configured'] = 'Ich habe die Dienste konfiguriert';
|
|||||||
$lng['panel']['system_is_configured'] = 'Das System ist bereits konfiguriert';
|
$lng['panel']['system_is_configured'] = 'Das System ist bereits konfiguriert';
|
||||||
$lng['panel']['settings_before_configuration'] = 'Stelle sicher, dass die Einstellungen angepasst wurden bevor die Dienste konfiguriert werden.';
|
$lng['panel']['settings_before_configuration'] = 'Stelle sicher, dass die Einstellungen angepasst wurden bevor die Dienste konfiguriert werden.';
|
||||||
$lng['panel']['alternative_cmdline_config'] = 'Alternativ, führe den folgenden Befehl als root-Benutzer auf der Shell aus, um die Dienste automatisch zu konfigurieren.';
|
$lng['panel']['alternative_cmdline_config'] = 'Alternativ, führe den folgenden Befehl als root-Benutzer auf der Shell aus, um die Dienste automatisch zu konfigurieren.';
|
||||||
$lng['tasks']['remove_pdns_domain'] = 'Lösche Domain %s von PowerDNS Datenbank';
|
$lng['tasks']['DELETE_DOMAIN_PDNS'] = 'Lösche Domain %domain% von PowerDNS Datenbank';
|
||||||
$lng['tasks']['remove_ssl_domain'] = 'Lösche SSL Dateien von Domain %s';
|
$lng['tasks']['DELETE_DOMAIN_SSL'] = 'Lösche SSL Dateien von Domain %domain%';
|
||||||
$lng['admin']['novhostcontainer'] = '<br><br><small class="red">Keine der IPs und Ports hat die Option "' . $lng['admin']['ipsandports']['create_vhostcontainer'] . '" aktiviert, einige Einstellungen sind daher nicht verfügbar.</small>';
|
$lng['admin']['novhostcontainer'] = '<br><br><small class="red">Keine der IPs und Ports hat die Option "' . $lng['admin']['ipsandports']['create_vhostcontainer'] . '" aktiviert, einige Einstellungen sind daher nicht verfügbar.</small>';
|
||||||
$lng['serversettings']['errorlog_level']['title'] = 'Ausführlichkeit des Fehlerprotokolls';
|
$lng['serversettings']['errorlog_level']['title'] = 'Ausführlichkeit des Fehlerprotokolls';
|
||||||
$lng['serversettings']['errorlog_level']['description'] = 'Steuert die Ausführlichkeit des Fehlerprotokolls. Voreinstellung ist "warn" bei Apache und "error" bei Nginx.';
|
$lng['serversettings']['errorlog_level']['description'] = 'Steuert die Ausführlichkeit des Fehlerprotokolls. Voreinstellung ist "warn" bei Apache und "error" bei Nginx.';
|
||||||
|
|||||||
@@ -884,11 +884,11 @@ $lng['update']['noupdatesavail'] = '<strong>È già presente l\'ultima versione
|
|||||||
$lng['admin']['specialsettingsforsubdomains'] = 'Applica le impostazioni speciali a tutti i sottodomini (*.esempio.com)';
|
$lng['admin']['specialsettingsforsubdomains'] = 'Applica le impostazioni speciali a tutti i sottodomini (*.esempio.com)';
|
||||||
$lng['serversettings']['specialsettingsforsubdomains']['description'] = 'Se si queste impostazioni personalizzate dei vhost saranno aggiunte a tutti sottodomini; se no le impostazioni speciali dei sottodomini verranno rimosse.';
|
$lng['serversettings']['specialsettingsforsubdomains']['description'] = 'Se si queste impostazioni personalizzate dei vhost saranno aggiunte a tutti sottodomini; se no le impostazioni speciali dei sottodomini verranno rimosse.';
|
||||||
$lng['tasks']['outstanding_tasks'] = 'Processi Cron in sospeso';
|
$lng['tasks']['outstanding_tasks'] = 'Processi Cron in sospeso';
|
||||||
$lng['tasks']['rebuild_webserverconfig'] = 'Ricostruzione della configurazione del webserver';
|
$lng['tasks']['REBUILD_VHOST'] = 'Ricostruzione della configurazione del webserver';
|
||||||
$lng['tasks']['adding_customer'] = 'Aggiunto il nuovo cliente %loginname%';
|
$lng['tasks']['CREATE_HOME'] = 'Aggiunto il nuovo cliente %loginname%';
|
||||||
$lng['tasks']['rebuild_bindconfig'] = 'Ricostruzione della configurazione di bind';
|
$lng['tasks']['REBUILD_DNS'] = 'Ricostruzione della configurazione di bind';
|
||||||
$lng['tasks']['creating_ftpdir'] = 'Creazione delle cartelle per i nuovi utenti ftp';
|
$lng['tasks']['CREATE_FTP'] = 'Creazione delle cartelle per i nuovi utenti ftp';
|
||||||
$lng['tasks']['deleting_customerfiles'] = 'Eliminazione dei file del cliente %loginname%';
|
$lng['tasks']['DELETE_CUSTOMER_FILES'] = 'Eliminazione dei file del cliente %loginname%';
|
||||||
$lng['tasks']['noneoutstanding'] = 'Attualmente non ci sono processi in sospeso per Froxlor';
|
$lng['tasks']['noneoutstanding'] = 'Attualmente non ci sono processi in sospeso per Froxlor';
|
||||||
|
|
||||||
// ADDED IN FROXLOR 0.9.1
|
// ADDED IN FROXLOR 0.9.1
|
||||||
@@ -1486,7 +1486,7 @@ $lng['serversettings']['diskquota_enabled'] = 'Quota attivita?';
|
|||||||
$lng['serversettings']['diskquota_repquota_path']['description'] = 'Percorso a repquota';
|
$lng['serversettings']['diskquota_repquota_path']['description'] = 'Percorso a repquota';
|
||||||
$lng['serversettings']['diskquota_quotatool_path']['description'] = 'Percorso al quotatool';
|
$lng['serversettings']['diskquota_quotatool_path']['description'] = 'Percorso al quotatool';
|
||||||
$lng['serversettings']['diskquota_customer_partition']['description'] = 'Partizione, sulla quale sono salvati i dati dei clienti';
|
$lng['serversettings']['diskquota_customer_partition']['description'] = 'Partizione, sulla quale sono salvati i dati dei clienti';
|
||||||
$lng['tasks']['diskspace_set_quota'] = 'Setta quota al filesystem';
|
$lng['tasks']['CREATE_QUOTA'] = 'Setta quota al filesystem';
|
||||||
$lng['error']['session_timeout'] = 'Valore troppo basso';
|
$lng['error']['session_timeout'] = 'Valore troppo basso';
|
||||||
$lng['error']['session_timeout_desc'] = 'Non dovresti settare il timeout della sessione ad un valore minore di 1 minuto.';
|
$lng['error']['session_timeout_desc'] = 'Non dovresti settare il timeout della sessione ad un valore minore di 1 minuto.';
|
||||||
$lng['admin']['assignedmax'] = 'Assegnato / Max';
|
$lng['admin']['assignedmax'] = 'Assegnato / Max';
|
||||||
@@ -1506,7 +1506,7 @@ $lng['admin']['delete_statistics'] = 'Elimina Statistiche';
|
|||||||
$lng['admin']['speciallogwarning'] = 'AVVISO: Cambiando questa impostazione perderai tutte le vecchie statistiche per questo dominio. Se sei sicuro che vuoi cambiare questo digita "%s" nel campo sottostante e clicca il bottone "elimina".<br /><br />';
|
$lng['admin']['speciallogwarning'] = 'AVVISO: Cambiando questa impostazione perderai tutte le vecchie statistiche per questo dominio. Se sei sicuro che vuoi cambiare questo digita "%s" nel campo sottostante e clicca il bottone "elimina".<br /><br />';
|
||||||
$lng['serversettings']['vmail_maildirname']['title'] = 'nome Maildir';
|
$lng['serversettings']['vmail_maildirname']['title'] = 'nome Maildir';
|
||||||
$lng['serversettings']['vmail_maildirname']['description'] = 'cartella Maildir nell account utente. Normalmente \'Maildir\', in alcune implementazioni \'.maildir\', e direttamente nella cartella utente se lasciato vuoto.';
|
$lng['serversettings']['vmail_maildirname']['description'] = 'cartella Maildir nell account utente. Normalmente \'Maildir\', in alcune implementazioni \'.maildir\', e direttamente nella cartella utente se lasciato vuoto.';
|
||||||
$lng['tasks']['remove_emailacc_files'] = 'Elimina i dati di posta elettronica del cliente.';
|
$lng['tasks']['DELETE_EMAIL_DATA'] = 'Elimina i dati di posta elettronica del cliente.';
|
||||||
$lng['error']['operationnotpermitted'] = 'Operazione non permessa!';
|
$lng['error']['operationnotpermitted'] = 'Operazione non permessa!';
|
||||||
$lng['error']['featureisdisabled'] = 'Funzionalità %s è disabilitata. Perfavore contatta il tuo fornitore di servizi.';
|
$lng['error']['featureisdisabled'] = 'Funzionalità %s è disabilitata. Perfavore contatta il tuo fornitore di servizi.';
|
||||||
$lng['serversettings']['catchall_enabled']['title'] = 'Usa Catchall';
|
$lng['serversettings']['catchall_enabled']['title'] = 'Usa Catchall';
|
||||||
@@ -1616,8 +1616,8 @@ $lng['admin']['cronsettings'] = 'Impostazioni Cronjob';
|
|||||||
$lng['serversettings']['system_cronconfig']['title'] = 'File di configurazione Cron';
|
$lng['serversettings']['system_cronconfig']['title'] = 'File di configurazione Cron';
|
||||||
$lng['serversettings']['system_cronconfig']['description'] = 'Percorso al file di configurazione del servizio cron. Questo file verrà aggiornato regolarmente ed automaticamente da froxlor.<br />
|
$lng['serversettings']['system_cronconfig']['description'] = 'Percorso al file di configurazione del servizio cron. Questo file verrà aggiornato regolarmente ed automaticamente da froxlor.<br />
|
||||||
Nota: Perfavore <b>sii sicuro</b> di usare lo stesso nome di file come per il cronjob principale di froxlor (predefinito: /etc/cron.d/froxlor)!<br><br>Se usi <b>FreeBSD</b>, qui specifica: <i>/etc/crontab</i>!';
|
Nota: Perfavore <b>sii sicuro</b> di usare lo stesso nome di file come per il cronjob principale di froxlor (predefinito: /etc/cron.d/froxlor)!<br><br>Se usi <b>FreeBSD</b>, qui specifica: <i>/etc/crontab</i>!';
|
||||||
$lng['tasks']['remove_ftpacc_files'] = 'Elimina i dati account-ftp del cliente.';
|
$lng['tasks']['DELETE_FTP_DATA'] = 'Elimina i dati account-ftp del cliente.';
|
||||||
$lng['tasks']['regenerating_crond'] = 'Ricostruisci il file cron.d';
|
$lng['tasks']['REBUILD_CRON'] = 'Ricostruisci il file cron.d';
|
||||||
$lng['serversettings']['system_crondreload']['title'] = 'Commando per riavviare il servizio Cron';
|
$lng['serversettings']['system_crondreload']['title'] = 'Commando per riavviare il servizio Cron';
|
||||||
$lng['serversettings']['system_crondreload']['description'] = 'Specifica il commando da eseguire per riavviare il servizio cron del tuo sistema';
|
$lng['serversettings']['system_crondreload']['description'] = 'Specifica il commando da eseguire per riavviare il servizio cron del tuo sistema';
|
||||||
$lng['admin']['integritycheck'] = 'Validazione Database';
|
$lng['admin']['integritycheck'] = 'Validazione Database';
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
<directory>tests/PhpAndFpm</directory>
|
<directory>tests/PhpAndFpm</directory>
|
||||||
<directory>tests/Traffic</directory>
|
<directory>tests/Traffic</directory>
|
||||||
<directory>tests/Froxlor</directory>
|
<directory>tests/Froxlor</directory>
|
||||||
|
<directory>tests/Cron</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
<logging>
|
<logging>
|
||||||
|
|||||||
2
templates/Sparkle/header.tpl
vendored
2
templates/Sparkle/header.tpl
vendored
@@ -63,7 +63,7 @@
|
|||||||
</if>
|
</if>
|
||||||
<if \Froxlor\Settings::Get('api.enabled') == 1>
|
<if \Froxlor\Settings::Get('api.enabled') == 1>
|
||||||
<li><a href="{$linker->getLink(array('section' => 'index', 'page' => 'apikeys'))}">{$lng['menue']['main']['apikeys']}</a></li>
|
<li><a href="{$linker->getLink(array('section' => 'index', 'page' => 'apikeys'))}">{$lng['menue']['main']['apikeys']}</a></li>
|
||||||
<li><a href="https://api.froxlor.org/doc/?v={$version}" rel="external">{$lng['menue']['main']['apihelp']}</a></li>
|
<li><a href="https://docs.froxlor.org/apiguide/index.html" rel="external">{$lng['menue']['main']['apihelp']}</a></li>
|
||||||
</if>
|
</if>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
84
tests/Cron/TaskIdTest.php
Normal file
84
tests/Cron/TaskIdTest.php
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
<?php
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
|
use Froxlor\Cron\TaskId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @covers \Froxlor\Cron\TaskId
|
||||||
|
*/
|
||||||
|
class TaskIDTest extends TestCase
|
||||||
|
{
|
||||||
|
private $fixedids = array(
|
||||||
|
'REBUILD_VHOST' => 1,
|
||||||
|
|
||||||
|
'CREATE_HOME' => 2,
|
||||||
|
|
||||||
|
'REBUILD_DNS' => 4,
|
||||||
|
|
||||||
|
'CREATE_FTP' => 5,
|
||||||
|
|
||||||
|
'DELETE_CUSTOMER_FILES' => 6,
|
||||||
|
|
||||||
|
'DELETE_EMAIL_DATA' => 7,
|
||||||
|
|
||||||
|
'DELETE_FTP_DATA' => 8,
|
||||||
|
|
||||||
|
'CREATE_QUOTA' => 10,
|
||||||
|
|
||||||
|
'DELETE_DOMAIN_PDNS' => 11,
|
||||||
|
|
||||||
|
'DELETE_DOMAIN_SSL' => 12,
|
||||||
|
|
||||||
|
'CREATE_CUSTOMER_BACKUP' => 20,
|
||||||
|
|
||||||
|
'REBUILD_CRON' => 99,
|
||||||
|
);
|
||||||
|
|
||||||
|
public function testValidTaskId()
|
||||||
|
{
|
||||||
|
|
||||||
|
$isId99Valid = TaskId::isValid(99);
|
||||||
|
$this->assertTrue($isId99Valid, "Task id 99 must be valid");
|
||||||
|
|
||||||
|
$isIdStringValid = TaskId::isValid('99');
|
||||||
|
$this->assertTrue($isIdStringValid, "String task ids should be valid");
|
||||||
|
|
||||||
|
$isNegativeValid = TaskId::isValid(-1);
|
||||||
|
$this->assertFalse($isNegativeValid, "Negative task should be invalid");
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testAcceptNewTaskId()
|
||||||
|
{
|
||||||
|
$isTESTTASKValid = TaskIdExtended::isValid(10101010);
|
||||||
|
$this->assertTrue($isTESTTASKValid);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function testFixedTaskIdTable()
|
||||||
|
{
|
||||||
|
$isTESTTASKValid = TaskIdExtended::isValid(10101010);
|
||||||
|
$this->assertTrue($isTESTTASKValid);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testIdMappingCorrect() {
|
||||||
|
foreach($this->fixedids as $name => $expected) {
|
||||||
|
$result = constant("\Froxlor\Cron\TaskId::$name");
|
||||||
|
$this->assertEquals( $expected, $result, "Task $name has bad mapping");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testConvertToConstant() {
|
||||||
|
foreach($this->fixedids as $name => $taskid) {
|
||||||
|
$result = TaskId::convertToConstant($taskid);
|
||||||
|
$this->assertEquals( $name, $result, "Task $name has bad mapping from id to name");
|
||||||
|
}
|
||||||
|
|
||||||
|
$unknownIDResult = TaskId::isValid(10101010);
|
||||||
|
$this->assertFalse($unknownIDResult);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class TaskIdExtended extends TaskId {
|
||||||
|
const TESTTASK = 10101010;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user