add cron-daemon reload command in order for new cron.d file to be applied, fixes #858

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2014-01-23 13:22:11 +01:00
parent d66e375d8a
commit abcdfb03d9
8 changed files with 44 additions and 4 deletions

View File

@@ -2701,3 +2701,18 @@ if (isFroxlorVersion('0.9.32-dev4')) {
updateToVersion('0.9.32-dev5');
}
if (isFroxlorVersion('0.9.32-dev54')) {
showUpdateStep("Updating from 0.9.32-dev5 to 0.9.32-dev6", false);
showUpdateStep("Adding new settings for cron-daemon reload command");
// get user-chosen value
$crondreload = isset($_POST['crondreload']) ? $_POST['crondreload'] : "/etc/init.d/cron reload";
Settings::AddNew("system.crondreload", $crondreload);
// add task to generate cron.d-file
inserttask('99');
lastStepStatus(0);
updateToVersion('0.9.32-dev6');
}

View File

@@ -638,7 +638,16 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version) {
$has_preconfig = true;
$description = 'Froxlor now generates a cron-configuration file for the cron-daemon. Please set a filename which will be included automatically by your crond (e.g. files in /etc/cron.d/)<br /><br />';
$question = '<strong>Path to the cron-service configuration-file.</strong> This file will be updated regularly and automatically by froxlor.<br />Note: Do <b>not</b> use the same filename as for the main froxlor cronjob (/etc/cron.d/froxlor)!<br />';
$question.= '<input type="text" class="text" name="crondfile" value="/etc/cron.d/froxlor" /><br />';
$question.= '<input type="text" class="text" name="crondfile" value="/etc/cron.d/froxlor-services" /><br />';
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_version, '0.9.32-dev6')) {
$has_preconfig = true;
$description = 'In order for the new cron.d file to work properly, we need to know about the cron-service reload command.<br /><br />';
$question = '<strong>Please specify the reload-command of your cron-daemon</strong> (default: /etc/init.d/cron reload)<br />';
$question.= '<input type="text" class="text" name="crondreload" value="/etc/init.d/cron reload" /><br />';
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
}