diff --git a/CRM/Civioffice/DocumentRendererType/LocalUnoconv.php b/CRM/Civioffice/DocumentRendererType/LocalUnoconv.php index f1d4745..6fbf47e 100644 --- a/CRM/Civioffice/DocumentRendererType/LocalUnoconv.php +++ b/CRM/Civioffice/DocumentRendererType/LocalUnoconv.php @@ -605,7 +605,7 @@ protected function lock() { $lock_file_path = $this->unoconv_lock_file_path; if ($lock_file_path) { - $this->unoconv_lock_file = fopen($lock_file_path, "r+"); + $this->unoconv_lock_file = fopen($lock_file_path, "w+"); if (!flock($this->unoconv_lock_file, LOCK_EX)) { throw new Exception(E::ts("CiviOffice: Could not acquire unoconv lock.")); } diff --git a/templates/CRM/Civioffice/Form/DocumentRenderer/Settings/LocalUnoconv.tpl b/templates/CRM/Civioffice/Form/DocumentRenderer/Settings/LocalUnoconv.tpl index f808067..d8d57dc 100644 --- a/templates/CRM/Civioffice/Form/DocumentRenderer/Settings/LocalUnoconv.tpl +++ b/templates/CRM/Civioffice/Form/DocumentRenderer/Settings/LocalUnoconv.tpl @@ -22,7 +22,7 @@
-
{ts}We strongly recommend creating a system-wide lock file on this server to synchronise access. (It may only run one unoconv process at the same time.) You can create such a file doing this in the server console:
touch /some/accessible/path/unoconv.lock && chmod 777 /some/accessible/path/unoconv.lock
Please note: This path needs to be equal in every civicrm environment on this server. Otherwise, locking is only active for this very civicrm instance!{/ts}
+
{ts}We strongly recommend creating a system-wide lock file on this server to synchronise access. (It may only run one unoconv process at the same time.) Such a file is created automatically at the location shown below. Please note: This path needs to be equal in every civicrm environment on this server. Otherwise, locking is only active for this very civicrm instance!{/ts}
{$form.unoconv_lock_file_path.label}
{$form.unoconv_lock_file_path.html}