Add a script for migrate from old config

This commit is contained in:
Victor LABORIE 2018-06-04 18:13:55 +02:00
parent 20e32c4149
commit d65e584439
1 changed files with 38 additions and 0 deletions

38
scripts/config-migrate.php Executable file
View File

@ -0,0 +1,38 @@
#!/usr/bin/php
<?php
error_reporting(E_ERROR);
require_once("/home/evoadmin-mail/www/htdocs/config/conf.php");
require_once("/home/evoadmin-mail/www/htdocs/config/connect.php");
?>
; The configuration for evoadmin-mail
;
; You need to copy and edit config-sample.ini to config.ini.
; This INI file is loaded by evoadmin-mail and contains the
; following configurations :
;
; * Global settings
; * LDAP settings
;
[global]
name = "<?php echo $conf['html']['title']; ?>";
mail = "<?php echo $conf['admin']['mail']; ?>"
[ldap]
host = "127.0.0.1"
port = 389
base = "<?php echo LDAP_BASE; ?>"
admin_dn = "<?php echo LDAP_ADMIN_DN; ?>"
admin_pass = "<?php echo LDAP_ADMIN_PASS; ?>"
<?php
foreach ($conf['admin']['logins'] as $admin) {
echo "superadmin[] = \"$admin\"";
}
?>
[log]
file = "../../log/evoadmin-mail.log"
level = error