Skip to content

Commit 963335e

Browse files
author
Till Brehm
committed
Merge branch 'update_jailkit' into 'develop'
jailkit update MR feedback See merge request ispconfig/ispconfig3!1185
2 parents 8b11675 + 7261ee5 commit 963335e

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

server/lib/classes/cron.d/600-jailkit_maintenance.inc.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,7 @@ public function onBeforeRun() {
5353
public function onRunJob() {
5454
global $app, $conf;
5555

56-
$app->uses('system,getconf');
57-
5856
$server_config = $app->getconf->get_server_config($conf['server_id'], 'server');
59-
if(isset($server_config['migration_mode']) && $server_config['migration_mode'] == 'y') {
60-
//$app->log('Migration mode active, not running Jailkit updates.', LOGLEVEL_DEBUG);
61-
print "Migration mode active, not running Jailkit updates.\n";
62-
63-
return;
64-
}
6557

6658
$jailkit_config = $app->getconf->get_server_config($conf['server_id'], 'jailkit');
6759
if (isset($this->jailkit_config) && isset($this->jailkit_config['jailkit_hardlinks'])) {
@@ -77,7 +69,7 @@ public function onRunJob() {
7769
// limit the number of jails we update at one time according to time of day
7870
$num_jails_to_update = (date('H') < 6) ? 25 : 3;
7971

80-
$sql = "SELECT domain_id, domain, document_root, php_fpm_chroot, jailkit_chroot_app_sections, jailkit_chroot_app_programs, delete_unused_jailkit, last_jailkit_hash FROM web_domain WHERE type = 'vhost' AND last_jailkit_update < (NOW() - INTERVAL 24 HOUR) AND server_id = ? ORDER by last_jailkit_update LIMIT ?";
72+
$sql = "SELECT domain_id, domain, document_root, php_fpm_chroot, jailkit_chroot_app_sections, jailkit_chroot_app_programs, delete_unused_jailkit, last_jailkit_hash FROM web_domain WHERE type = 'vhost' AND (last_jailkit_update IS NULL OR last_jailkit_update < (NOW() - INTERVAL 24 HOUR)) AND server_id = ? ORDER by last_jailkit_update LIMIT ?";
8173
$records = $app->db->queryAllRecords($sql, $conf['server_id'], $num_jails_to_update);
8274

8375
foreach($records as $rec) {

server/plugins-available/apache2_plugin.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3713,12 +3713,12 @@ function _setup_jailkit_chroot()
37133713

37143714
if (isset($this->jailkit_config) && isset($this->jailkit_config['jailkit_hardlinks'])) {
37153715
if ($this->jailkit_config['jailkit_hardlinks'] == 'yes') {
3716-
$options = array( 'hardlink');
3716+
$options = array('hardlink');
37173717
} elseif ($this->jailkit_config['jailkit_hardlinks'] == 'no') {
37183718
$options = array();
37193719
}
37203720
} else {
3721-
$options = array( 'allow_hardlink');
3721+
$options = array('allow_hardlink');
37223722
}
37233723

37243724
// should move return here if $this->website['new_jailkit_hash'] == $this->website['last_jailkit_hash'] ?

server/plugins-available/nginx_plugin.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3485,12 +3485,12 @@ function _setup_jailkit_chroot()
34853485

34863486
if (isset($this->jailkit_config) && isset($this->jailkit_config['jailkit_hardlinks'])) {
34873487
if ($this->jailkit_config['jailkit_hardlinks'] == 'yes') {
3488-
$options = array( 'hardlink');
3488+
$options = array('hardlink');
34893489
} elseif ($this->jailkit_config['jailkit_hardlinks'] == 'no') {
34903490
$options = array();
34913491
}
34923492
} else {
3493-
$options = array( 'allow_hardlink');
3493+
$options = array('allow_hardlink');
34943494
}
34953495

34963496
// should move return here if $this->website['new_jailkit_hash'] == $this->website['last_jailkit_hash'] ?

0 commit comments

Comments
 (0)