You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// limit the number of jails we update at one time according to time of day
@@ -86,6 +86,14 @@ public function onRunJob() {
86
86
// check for any cron job using this jail
87
87
$cron_inuse = $app->db->queryOneRecord('SELECT id FROM `cron` WHERE `parent_domain_id` = ? AND `type` = ? AND `server_id` = ?', $rec['domain_id'], 'chrooted', $conf['server_id']);
88
88
89
+
$records2 = $app->db->queryAllRecords('SELECT web_folder FROM `web_domain` WHERE `parent_domain_id` = ? AND `document_root` = ? AND web_folder != \'\' AND web_folder IS NOT NULL AND `server_id` = ?', $rec['domain_id'], $rec['document_root'], $conf['server_id']);
90
+
foreach ($records2as$record2) {
91
+
if ($record2['web_folder'] == NULL || $record2['web_folder'] == '') {
$records = $app->db->queryAllRecords('SELECT web_folder FROM `web_domain` WHERE `parent_domain_id` = ? AND `document_root` = ? AND web_folder != \'\' AND web_folder IS NOT NULL AND `server_id` = ?', $data['new']['domain_id'], $data['new']['document_root'], $conf['server_id']);
835
+
foreach ($recordsas$record) {
836
+
$options[] = 'skip='.$record['web_folder'];
837
+
}
838
+
834
839
// don't update if last_jailkit_hash is the same
835
840
$tmp = $app->db->queryOneRecord('SELECT `last_jailkit_hash` FROM web_domain WHERE domain_id = ?', $data['new']['parent_domain_id']);
836
841
if ($update_hash != $tmp['last_jailkit_hash']) {
@@ -3683,7 +3688,7 @@ private function get_seo_redirects($web, $prefix = ''){
3683
3688
3684
3689
function_setup_jailkit_chroot()
3685
3690
{
3686
-
global$app;
3691
+
global$app, $conf;
3687
3692
3688
3693
$app->uses('system');
3689
3694
@@ -3746,6 +3751,11 @@ function _setup_jailkit_chroot()
3746
3751
return;
3747
3752
}
3748
3753
3754
+
$records = $app->db->queryAllRecords('SELECT web_folder FROM `web_domain` WHERE `parent_domain_id` = ? AND `document_root` = ? AND web_folder != \'\' AND web_folder IS NOT NULL AND `server_id` = ?', $this->website['domain_id'], $this->website['document_root'], $conf['server_id']);
$records = $app->db->queryAllRecords('SELECT web_folder FROM `web_domain` WHERE `parent_domain_id` = ? AND `document_root` = ? AND web_folder != \'\' AND web_folder IS NOT NULL AND `server_id` = ?', $parent_domain_id, $parent_domain['document_root'], $conf['server_id']);
Copy file name to clipboardExpand all lines: server/plugins-available/cron_jailkit_plugin.inc.php
+12-1Lines changed: 12 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -296,6 +296,11 @@ function _setup_jailkit_chroot()
296
296
return;
297
297
}
298
298
299
+
$records = $app->db->queryAllRecords('SELECT web_folder FROM `web_domain` WHERE `parent_domain_id` = ? AND `document_root` = ? AND web_folder != \'\' AND web_folder IS NOT NULL AND `server_id` = ?', $this->parent_domain['domain_id'], $this->parent_domain['document_root'], $conf['server_id']);
$records = $app->db->queryAllRecords('SELECT web_folder FROM `web_domain` WHERE `parent_domain_id` = ? AND `document_root` = ? AND web_folder != \'\' AND web_folder IS NOT NULL AND `server_id` = ?', $parent_domain_id, $parent_domain['document_root'], $conf['server_id']);
$records = $app->db->queryAllRecords('SELECT web_folder FROM `web_domain` WHERE `parent_domain_id` = ? AND `document_root` = ? AND web_folder != \'\' AND web_folder IS NOT NULL AND `server_id` = ?', $data['new']['domain_id'], $data['new']['document_root'], $conf['server_id']);
673
+
foreach ($recordsas$record) {
674
+
$options[] = 'skip='.$record['web_folder'];
675
+
}
676
+
672
677
// don't update if last_jailkit_hash is the same
673
678
$tmp = $app->db->queryOneRecord('SELECT `last_jailkit_hash` FROM web_domain WHERE domain_id = ?', $data['new']['parent_domain_id']);
@@ -3525,6 +3530,11 @@ function _setup_jailkit_chroot()
3525
3530
return;
3526
3531
}
3527
3532
3533
+
$records = $app->db->queryAllRecords('SELECT web_folder FROM `web_domain` WHERE `parent_domain_id` = ? AND `document_root` = ? AND web_folder != \'\' AND web_folder IS NOT NULL AND `server_id` = ?', $this->website['domain_id'], $this->website['document_root'], $conf['server_id']);
$records = $app->db->queryAllRecords('SELECT web_folder FROM `web_domain` WHERE `parent_domain_id` = ? AND `document_root` = ? AND web_folder != \'\' AND web_folder IS NOT NULL AND `server_id` = ?', $parent_domain_id, $parent_domain['document_root'], $conf['server_id']);
Copy file name to clipboardExpand all lines: server/plugins-available/shelluser_jailkit_plugin.inc.php
+13-2Lines changed: 13 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -286,7 +286,7 @@ function delete($event_name, $data) {
286
286
287
287
function_setup_jailkit_chroot()
288
288
{
289
-
global$app;
289
+
global$app, $conf;
290
290
291
291
if (isset($this->jailkit_config) && isset($this->jailkit_config['jailkit_hardlinks'])) {
292
292
if ($this->jailkit_config['jailkit_hardlinks'] == 'yes') {
@@ -356,6 +356,11 @@ function _setup_jailkit_chroot()
356
356
return;
357
357
}
358
358
359
+
$records = $app->db->queryAllRecords('SELECT web_folder FROM `web_domain` WHERE `parent_domain_id` = ? AND `document_root` = ? AND web_folder != \'\' AND web_folder IS NOT NULL AND `server_id` = ?', $this->data['new']['parent_domain_id'], $this->data['new']['dir'], $conf['server_id']);
$records = $app->db->queryAllRecords('SELECT web_folder FROM `web_domain` WHERE `parent_domain_id` = ? AND `document_root` = ? AND web_folder != \'\' AND web_folder IS NOT NULL AND `server_id` = ?', $parent_domain_id, $parent_domain['document_root'], $conf['server_id']);
0 commit comments