Commit f2ec8695 authored by Till Brehm's avatar Till Brehm

Set file mode explicitly for rspamd worker-controller.inc config file to not rely on system umask.

parent 065d5ff9
Pipeline #1536 passed with stage
in 2 minutes and 25 seconds
...@@ -1644,7 +1644,8 @@ class installer_base { ...@@ -1644,7 +1644,8 @@ class installer_base {
$tpl = new tpl(); $tpl = new tpl();
$tpl->newTemplate('rspamd_worker-controller.inc.master'); $tpl->newTemplate('rspamd_worker-controller.inc.master');
$tpl->setVar('rspamd_password', $mail_config['rspamd_password']); $tpl->setVar('rspamd_password', $mail_config['rspamd_password']);
wf('/etc/rspamd/local.d/worker-controller.inc', $tpl->grab()); wf('/etc/rspamd/local.d/worker-controller.inc', $tpl->grab());
chmod('/etc/rspamd/local.d/worker-controller.inc', 0644);
} }
public function configure_spamassassin() { public function configure_spamassassin() {
......
...@@ -242,6 +242,7 @@ class postfix_server_plugin { ...@@ -242,6 +242,7 @@ class postfix_server_plugin {
$tpl->newTemplate('rspamd_worker-controller.inc.master'); $tpl->newTemplate('rspamd_worker-controller.inc.master');
$tpl->setVar('rspamd_password', $rspamd_password); $tpl->setVar('rspamd_password', $rspamd_password);
$app->system->file_put_contents('/etc/rspamd/local.d/worker-controller.inc', $tpl->grab()); $app->system->file_put_contents('/etc/rspamd/local.d/worker-controller.inc', $tpl->grab());
chmod('/etc/rspamd/local.d/worker-controller.inc', 0644);
$app->services->restartServiceDelayed('rspamd', 'reload'); $app->services->restartServiceDelayed('rspamd', 'reload');
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment