New install finishes with [ERROR] Cron not found
short description
Seeing this more often with OSes migrating to systemd and journal; especially when trying to setup multi-server sets on VMs and Linux Containers.
ISPConfig crontab fails to install which requires the sysadmin to take various actions to repair the installation. Also, upon a successful finish the line "Installing ISPConfig crontab" prints twice.
correct behaviour
ISPConfig depends upon "crontab" to be present, therefore the install should detect its absence earlier and stop the installation prior to making changes; and alert the sysadmin that crontab is needed before installation.
Success should either be announced or ignored as redundant.
- ISPConfig requires some sort of cron
- many minimal systems exclude any type of cron management
- installer_base.lib.php checks for cron OR anacron
- technically install_crontab() depends upon crontab
- the name for cron differs by system; crontab is consistent
environment
- Server OS: varies
- Server OS version: varies
- ISPConfig version: 3.2.0
proposed fixes
Note: I will gladly put this in the form of a Merge Request (I'm just new here)
- Change installer_base.lib.php to check for crontab (currently line 195)
if(is_installed('crontab')) $conf['cron']['installed'] = true;
- add logic similar to the following in install.php just after $inst->find_installed_apps() (currently line 174) [updated more friendly output]
//* crontab required by ISPConfig
if(!$conf['cron']['installed']) {
die("crontab not found; please install a compatible cron daemon before ISPConfig\n\n");
}
- Change the ISPConfig install logic to be simply: (currently line 608)
//* Configure ISPConfig
swriteln('Installing ISPConfig crontab');
$inst->install_crontab();