Skip to content
Snippets Groups Projects
Commit b7332908 authored by tbrehm's avatar tbrehm
Browse files

- Fixed several bugs in the installer.

- Changed mbox regex in dns manager.
parent 51f8f0b7
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,7 @@ $conf['mysql']['database'] = 'dbispconfig'; ...@@ -25,7 +25,7 @@ $conf['mysql']['database'] = 'dbispconfig';
$conf['mysql']['admin_user'] = 'root'; $conf['mysql']['admin_user'] = 'root';
$conf['mysql']['admin_password'] = ''; $conf['mysql']['admin_password'] = '';
$conf['mysql']['ispconfig_user'] = 'ispconfig'; $conf['mysql']['ispconfig_user'] = 'ispconfig';
$conf['mysql']['ispconfig_password'] = '5sDrewBhk'; $conf['mysql']['ispconfig_password'] = md5 (uniqid (rand()));
//* Apache //* Apache
$conf['apache']['user'] = 'www-data'; $conf['apache']['user'] = 'www-data';
......
...@@ -438,6 +438,38 @@ function array_to_ini($config_array = '') { ...@@ -438,6 +438,38 @@ function array_to_ini($config_array = '') {
return $content; return $content;
} }
function is_user($user){
global $mod;
$user_datei = '/etc/passwd';
$users = no_comments($user_datei);
$lines = explode("\n", $users);
if(is_array($lines)){
foreach($lines as $line){
if(trim($line) != ""){
list($f1, $f2, $f3, $f4, $f5, $f6, $f7) = explode(":", $line);
if($f1 == $user) return true;
}
}
}
return false;
}
function is_group($group){
global $mod;
$group_datei = '/etc/group';
$groups = no_comments($group_datei);
$lines = explode("\n", $groups);
if(is_array($lines)){
foreach($lines as $line){
if(trim($line) != ""){
list($f1, $f2, $f3, $f4) = explode(":", $line);
if($f1 == $group) return true;
}
}
}
return false;
}
?> ?>
\ No newline at end of file
...@@ -664,10 +664,10 @@ class installer_base { ...@@ -664,10 +664,10 @@ class installer_base {
//* Create a ISPConfig user and group //* Create a ISPConfig user and group
$command = 'groupadd ispconfig'; $command = 'groupadd ispconfig';
caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); if(!is_group('vacp')) caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
$command = "useradd -g ispconfig -d $install_dir ispconfig"; $command = "useradd -g ispconfig -d $install_dir ispconfig";
caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); if(!is_user('vacp')) caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
//* copy the ISPConfig interface part //* copy the ISPConfig interface part
$command = "cp -rf ../interface $install_dir"; $command = "cp -rf ../interface $install_dir";
......
...@@ -108,7 +108,7 @@ $form["tabs"]['dns_soa'] = array ( ...@@ -108,7 +108,7 @@ $form["tabs"]['dns_soa'] = array (
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'mbox_error_empty'), 'errmsg'=> 'mbox_error_empty'),
1 => array ( 'type' => 'REGEX', 1 => array ( 'type' => 'REGEX',
'regex' => '/^[\w\.\-]{0,64}\.$/', 'regex' => '/^[[a-zA-Z0-9\.\-]{0,64}\.$/',
'errmsg'=> 'mbox_error_regex'), 'errmsg'=> 'mbox_error_regex'),
), ),
'default' => '', 'default' => '',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment