| | |
| | | $configfile = 'dovecot-sql.conf'; |
| | | if(is_file("$config_dir/$configfile")){ |
| | | copy("$config_dir/$configfile", "$config_dir/$configfile~"); |
| | | exec("chmod 400 $config_dir/$configfile~"); |
| | | } |
| | | exec("chmod 400 $config_dir/$configfile~"); |
| | | |
| | | $content = rf("tpl/opensuse_dovecot-sql.conf.master"); |
| | | $content = str_replace('{mysql_server_ispconfig_user}',$conf['mysql']['ispconfig_user'],$content); |
| | | $content = str_replace('{mysql_server_ispconfig_password}',$conf['mysql']['ispconfig_password'], $content); |
| | |
| | | //** Get the hostname |
| | | $tmp_out = array(); |
| | | exec('hostname -f', $tmp_out); |
| | | $conf['hostname'] = $inst->free_query('Full qualified hostname (FQDN) of the server, eg server1.domain.tld ', $tmp_out[0]); |
| | | $conf['hostname'] = $inst->free_query('Full qualified hostname (FQDN) of the server, eg server1.domain.tld ', @$tmp_out[0]); |
| | | unset($tmp_out); |
| | | |
| | | // Check if the mysql functions are loaded in PHP |