diff --git a/actions/admin/settings/125.cronjob.php b/actions/admin/settings/125.cronjob.php
index 8657ff09..fa8246d6 100644
--- a/actions/admin/settings/125.cronjob.php
+++ b/actions/admin/settings/125.cronjob.php
@@ -26,7 +26,7 @@ return array(
'varname' => 'cronconfig',
'type' => 'string',
'string_type' => 'file',
- 'default' => '/etc/cron.d/froxlor-services',
+ 'default' => '/etc/cron.d/froxlor',
'save_method' => 'storeSettingField',
),
'system_crondreload' => array(
diff --git a/install/froxlor.sql b/install/froxlor.sql
index 43a3d8cf..89d2d6ee 100644
--- a/install/froxlor.sql
+++ b/install/froxlor.sql
@@ -499,7 +499,7 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
('system', 'mdaserver', 'dovecot'),
('system', 'mtaserver', 'postfix'),
('system', 'mailtraffic_enabled', '1'),
- ('system', 'cronconfig', '/etc/cron.d/froxlor-services'),
+ ('system', 'cronconfig', '/etc/cron.d/froxlor'),
('system', 'crondreload', '/etc/init.d/cron reload'),
('panel', 'decimal_places', '4'),
('panel', 'adminmail', 'admin@SERVERNAME'),
diff --git a/install/updates/froxlor/0.9/update_0.9.inc.php b/install/updates/froxlor/0.9/update_0.9.inc.php
index 9936f6ae..6f375d33 100644
--- a/install/updates/froxlor/0.9/update_0.9.inc.php
+++ b/install/updates/froxlor/0.9/update_0.9.inc.php
@@ -2692,7 +2692,7 @@ if (isFroxlorVersion('0.9.32-dev4')) {
showUpdateStep("Adding new settings for cron");
// get user-chosen value
- $crondfile = isset($_POST['crondfile']) ? $_POST['crondfile'] : "/etc/cron.d/froxlor-services";
+ $crondfile = isset($_POST['crondfile']) ? $_POST['crondfile'] : "/etc/cron.d/froxlor";
$crondfile = makeCorrectFile($crondfile);
Settings::AddNew("system.cronconfig", $crondfile);
// add task to generate cron.d-file
diff --git a/install/updates/preconfig/0.9/preconfig_0.9.inc.php b/install/updates/preconfig/0.9/preconfig_0.9.inc.php
index abf4f54b..670f3be9 100644
--- a/install/updates/preconfig/0.9/preconfig_0.9.inc.php
+++ b/install/updates/preconfig/0.9/preconfig_0.9.inc.php
@@ -637,8 +637,8 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version) {
if (versionInUpdate($current_version, '0.9.32-dev5')) {
$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/)
';
- $question = 'Path to the cron-service configuration-file. This file will be updated regularly and automatically by froxlor. Note: Do not use the same filename as for the main froxlor cronjob (/etc/cron.d/froxlor)! ';
- $question.= ' ';
+ $question = 'Path to the cron-service configuration-file. This file will be updated regularly and automatically by froxlor. Note: please be sure to use the same filename as for the main froxlor cronjob (default: /etc/cron.d/froxlor)! ';
+ $question.= ' ';
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
diff --git a/lib/cron_init.php b/lib/cron_init.php
index 2afc0ecd..87ffa74a 100644
--- a/lib/cron_init.php
+++ b/lib/cron_init.php
@@ -31,8 +31,19 @@ if (function_exists("date_default_timezone_set")
@date_default_timezone_set(@date_default_timezone_get());
}
+$basename = basename($_SERVER['PHP_SELF'], '.php');
+if (isset($argv) && is_array($argv) && count($argv) > 1) {
+ for($x=1;$x < count($argv);$x++) {
+ if (substr(strtolower($argv[$x]), 0, 2) == '--'
+ && strlen($argv[$x]) > 3
+ ) {
+ $basename .= "-".substr(strtolower($argv[$x]), 2);
+ break;
+ }
+ }
+}
$lockdir = '/var/run/';
-$lockFilename = 'froxlor_' . basename($_SERVER['PHP_SELF'], '.php') . '.lock-';
+$lockFilename = 'froxlor_' . $basename . '.lock-';
$lockfName = $lockFilename . getmypid();
$lockfile = $lockdir . $lockfName;
diff --git a/lng/english.lng.php b/lng/english.lng.php
index a7f76840..7bee0b20 100644
--- a/lng/english.lng.php
+++ b/lng/english.lng.php
@@ -1799,7 +1799,7 @@ $lng['serversettings']['mtalog']['description'] = "Logfile of the Mail Transfer
$lng['panel']['ftpdesc'] = 'FTP description';
$lng['admin']['cronsettings'] = 'Cronjob settings';
$lng['serversettings']['system_cronconfig']['title'] = 'Cron configuration file';
-$lng['serversettings']['system_cronconfig']['description'] = 'Path to the cron-service configuration-file. This file will be updated regularly and automatically by froxlor. Note: Do not use the same filename as for the main froxlor cronjob (/etc/cron.d/froxlor)!';
+$lng['serversettings']['system_cronconfig']['description'] = 'Path to the cron-service configuration-file. This file will be updated regularly and automatically by froxlor. Note: Please be sure to use the same filename as for the main froxlor cronjob (default: /etc/cron.d/froxlor)!';
$lng['tasks']['remove_ftpacc_files'] = 'Delete customer ftp-account data.';
$lng['tasks']['regenerating_crond'] = 'Rebuilding the cron.d-file';
$lng['serversettings']['system_crondreload']['title'] = 'Cron-daemon reload command';
diff --git a/lng/german.lng.php b/lng/german.lng.php
index b0cff106..cb6c1d52 100644
--- a/lng/german.lng.php
+++ b/lng/german.lng.php
@@ -1525,7 +1525,7 @@ $lng['serversettings']['mtalog']['description'] = "Die Logdatei des Mail Transfe
$lng['panel']['ftpdesc'] = 'FTP Beschreibung';
$lng['admin']['cronsettings'] = 'Cronjob Einstellungen';
$lng['serversettings']['system_cronconfig']['title'] = 'Cron-Konfigurationsdatei';
-$lng['serversettings']['system_cronconfig']['description'] = 'Pfad zur Konfigurationsdatei des Cron-Dienstes. Diese Datei wird von froxlor automatisch aktualisiert. Hinweis: bitte nicht die gleiche Datei wie für den Froxlor-Haupt-Cronjob angeben (/etc/cron.d/froxlor)!';
+$lng['serversettings']['system_cronconfig']['description'] = 'Pfad zur Konfigurationsdatei des Cron-Dienstes. Diese Datei wird von froxlor automatisch aktualisiert. Hinweis: bitte verwenden Sie exakt die gleiche Datei wie für den Froxlor-Haupt-Cronjob angeben (Standard: /etc/cron.d/froxlor)!';
$lng['tasks']['remove_ftpacc_files'] = 'Kunden FTP-Konto Dateien löschen';
$lng['tasks']['regenerating_crond'] = 'Neuerstellung der cron.d-Datei';
$lng['serversettings']['system_crondreload']['title'] = 'Cron-Daemon reload Befehl';