placeholders not always handeld with cron-jobs
See https://www.howtoforge.com/community/threads/cron-for-one-site-not-running.88003/#post-429555
fix cron_plugin.inc.php:
- add
web_folder
to $parent_domain in line 95
$parent_domain = $app->db->queryOneRecord("SELECT `domain_id`, `system_user`, `system_group`, `document_root`, `hd_quota`, `web_folder` FROM `web_domain` WHERE `domain_id` = ?", $data["new"]["parent_domain_id"]);
- replace (line 251+)
$web_root = '';
if($job['type'] == 'chrooted') {
if(substr($job['command'], 0, strlen($this->parent_domain['document_root'])) == $this->parent_domain['document_root']) {
//* delete the unneeded path part
$job['command'] = substr($job['command'], strlen($this->parent_domain['document_root']));
}
} else {
$web_root = $this->parent_domain['document_root'];
}
with
$web_folder = ($this->parent_domain['web_folder'] != '') ? $this->parent_domain['web_folder'] : 'web';
if($job['type'] == 'chrooted') {
if(substr($job['command'], 0, strlen($this->parent_domain['document_root'])) == $this->parent_domain['document_root']) {
//* delete the unneeded path part
$job['command'] = substr($job['command'], strlen($this->parent_domain['document_root']));
} else {
$web_root = '/'.$web_folder;
}
} else {
$web_root = $this->parent_domain['document_root'] . '/' . $web_folder;
}