File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ class installer_centos extends installer_dist {
3333 protected $ clamav_socket = '/tmp/clamd.socket ' ;
3434
3535 public function configure_amavis () {
36- global $ conf ;
36+ global $ conf, $ dist ;
3737
3838 // amavisd user config file
3939 $ configfile = 'fedora_amavisd_conf ' ;
@@ -50,6 +50,12 @@ public function configure_amavis() {
5050 $ content = str_replace ('/var/spool/amavisd/clamd.sock ' , $ this ->clamav_socket , $ content );
5151 wf ($ conf ["amavis " ]["config_dir " ].'/amavisd.conf ' , $ content );
5252 chmod ($ conf ['amavis ' ]['config_dir ' ].'/amavisd.conf ' , 0640 );
53+
54+ // for CentOS 7.2 only
55+ if ($ dist ['confid ' ] == 'centos72 ' ) {
56+ chmod ($ conf ['amavis ' ]['config_dir ' ].'/amavisd.conf ' , 0750 );
57+ chgrp ($ conf ['amavis ' ]['config_dir ' ].'/amavisd.conf ' , 'amavis ' );
58+ }
5359
5460
5561 // Adding the amavisd commands to the postfix configuration
Original file line number Diff line number Diff line change @@ -480,7 +480,7 @@ public function configure_dovecot()
480480 }
481481
482482 public function configure_amavis () {
483- global $ conf ;
483+ global $ conf, $ dist ;
484484
485485 // amavisd user config file
486486 $ configfile = 'fedora_amavisd_conf ' ;
@@ -497,8 +497,7 @@ public function configure_amavis() {
497497 chmod ($ conf ['amavis ' ]['config_dir ' ].'/amavisd.conf ' , 0640 );
498498
499499 // for CentOS 7.2 only
500- $ distname = get_distname ();
501- if ($ distname ['confid ' ] == 'centos72 ' ) {
500+ if ($ dist ['confid ' ] == 'centos72 ' ) {
502501 chmod ($ conf ['amavis ' ]['config_dir ' ].'/amavisd.conf ' , 0750 );
503502 chgrp ($ conf ['amavis ' ]['config_dir ' ].'/amavisd.conf ' , 'amavis ' );
504503 }
You can’t perform that action at this time.
0 commit comments