Skip to content

Commit 89ebae0

Browse files
author
Till Brehm
committed
Fix warning that the file /etc/rspamd/local.d/worker-controller.inc does not exists during installation.
1 parent a51d6a9 commit 89ebae0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

install/lib/installer_base.lib.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1981,8 +1981,13 @@ public function configure_rspamd() {
19811981

19821982
exec('chmod a+r /etc/rspamd/local.d/* /etc/rspamd/local.d/maps.d/* /etc/rspamd/override.d/*');
19831983
# protect passwords in these files
1984-
exec('chgrp _rspamd /etc/rspamd/local.d/redis.conf /etc/rspamd/local.d/classifier-bayes.conf /etc/rspamd/local.d/worker-controller.inc');
1985-
exec('chmod 640 /etc/rspamd/local.d/redis.conf /etc/rspamd/local.d/classifier-bayes.conf /etc/rspamd/local.d/worker-controller.inc');
1984+
exec('chgrp _rspamd /etc/rspamd/local.d/redis.conf /etc/rspamd/local.d/classifier-bayes.conf');
1985+
exec('chmod 640 /etc/rspamd/local.d/redis.conf /etc/rspamd/local.d/classifier-bayes.conf');
1986+
1987+
if(file_exists('/etc/rspamd/local.d/worker-controller.inc')) {
1988+
exec('chgrp _rspamd /etc/rspamd/local.d/worker-controller.inc');
1989+
exec('chmod 640 /etc/rspamd/local.d/worker-controller.inc');
1990+
}
19861991

19871992
# unneccesary, since this was done above?
19881993
$command = 'usermod -a -G amavis _rspamd';

0 commit comments

Comments
 (0)