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

@@ -499,7 +499,8 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
('system', 'mdaserver', 'dovecot'),
('system', 'mtaserver', 'postfix'),
('system', 'mailtraffic_enabled', '1'),
('system', 'cronconfig', '/etc/cron.d/froxlor'),
('system', 'cronconfig', '/etc/cron.d/froxlor-services'),
('system', 'crondreload', '/etc/init.d/cron reload'),
('panel', 'decimal_places', '4'),
('panel', 'adminmail', 'admin@SERVERNAME'),
('panel', 'phpmyadmin_url', ''),
@@ -527,7 +528,7 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
('panel', 'phpconfigs_hidestdsubdomain', '0'),
('panel', 'allow_theme_change_admin', '1'),
('panel', 'allow_theme_change_customer', '1'),
('panel', 'version', '0.9.32-dev5');
('panel', 'version', '0.9.32-dev6');
DROP TABLE IF EXISTS `panel_tasks`;

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") . "\";");
}
}