Newer
Older
list($user, $group) = $output;
}
break;
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
}
}
if (!empty($user) && !empty($group)) {
chown($tConf, $user);
chgrp($tConf, $group);
}
if (!empty($access)) {
exec("chmod $access $tConf");
}
}
/**
* Helper function - filter the contents of a config
* file by inserting the common ispconfig database
* credentials.
*
* @param $tContents
* @return string
*/
protected function insert_db_credentials($tContents) {
global $conf;
$tContents = str_replace('{mysql_server_ispconfig_user}', $conf["mysql"]["ispconfig_user"], $tContents);
$tContents = str_replace('{mysql_server_ispconfig_password}', $conf["mysql"]["ispconfig_password"], $tContents);
$tContents = str_replace('{mysql_server_database}', $conf["mysql"]["database"], $tContents);
$tContents = str_replace('{mysql_server_ip}', $conf["mysql"]["ip"], $tContents);
$tContents = str_replace('{mysql_server_host}', $conf['mysql']['host'], $tContents);
Michel Käser
committed
$tContents = str_replace('{mysql_server_port}', $conf['mysql']['port'], $tContents);
$tContents = str_replace('{mysql_server_port}', $conf["mysql"]["port"], $tContents);