Commit 671f79d3 authored by Florian Schaal's avatar Florian Schaal
parents e59fe36d be531cf1
...@@ -123,6 +123,7 @@ class installer extends installer_dist { ...@@ -123,6 +123,7 @@ class installer extends installer_dist {
$content = str_replace('{hostname}', $conf['hostname'], $content); $content = str_replace('{hostname}', $conf['hostname'], $content);
$content = str_replace('/var/spool/amavisd/clamd.sock', '/tmp/clamd.socket', $content); $content = str_replace('/var/spool/amavisd/clamd.sock', '/tmp/clamd.socket', $content);
wf($conf["amavis"]["config_dir"].'/amavisd.conf', $content); wf($conf["amavis"]["config_dir"].'/amavisd.conf', $content);
chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640);
// Adding the amavisd commands to the postfix configuration // Adding the amavisd commands to the postfix configuration
......
...@@ -124,6 +124,7 @@ class installer extends installer_dist { ...@@ -124,6 +124,7 @@ class installer extends installer_dist {
$content = str_replace('{hostname}', $conf['hostname'], $content); $content = str_replace('{hostname}', $conf['hostname'], $content);
$content = str_replace('/var/spool/amavisd/clamd.sock', '/var/run/clamav/clamd.sock', $content); $content = str_replace('/var/spool/amavisd/clamd.sock', '/var/run/clamav/clamd.sock', $content);
wf($conf["amavis"]["config_dir"].'/amavisd.conf', $content); wf($conf["amavis"]["config_dir"].'/amavisd.conf', $content);
chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640);
// Adding the amavisd commands to the postfix configuration // Adding the amavisd commands to the postfix configuration
......
...@@ -124,6 +124,7 @@ class installer extends installer_dist { ...@@ -124,6 +124,7 @@ class installer extends installer_dist {
$content = str_replace('{hostname}', $conf['hostname'], $content); $content = str_replace('{hostname}', $conf['hostname'], $content);
$content = str_replace('/var/spool/amavisd/clamd.sock', '/var/run/clamav/clamd.sock', $content); $content = str_replace('/var/spool/amavisd/clamd.sock', '/var/run/clamav/clamd.sock', $content);
wf($conf["amavis"]["config_dir"].'/amavisd.conf', $content); wf($conf["amavis"]["config_dir"].'/amavisd.conf', $content);
chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640);
// Adding the amavisd commands to the postfix configuration // Adding the amavisd commands to the postfix configuration
......
...@@ -522,6 +522,7 @@ class installer_dist extends installer_base { ...@@ -522,6 +522,7 @@ class installer_dist extends installer_base {
$content = str_replace('{mysql_server_ip}', $conf['mysql']['ip'], $content); $content = str_replace('{mysql_server_ip}', $conf['mysql']['ip'], $content);
$content = str_replace('{hostname}', $conf['hostname'], $content); $content = str_replace('{hostname}', $conf['hostname'], $content);
wf($conf["amavis"]["config_dir"].'/amavisd.conf', $content); wf($conf["amavis"]["config_dir"].'/amavisd.conf', $content);
chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640);
// Adding the amavisd commands to the postfix configuration // Adding the amavisd commands to the postfix configuration
...@@ -1326,7 +1327,12 @@ class installer_dist extends installer_base { ...@@ -1326,7 +1327,12 @@ class installer_dist extends installer_base {
// Add symlink for patch tool // Add symlink for patch tool
if(!is_link('/usr/local/bin/ispconfig_patch')) exec('ln -s /usr/local/ispconfig/server/scripts/ispconfig_patch /usr/local/bin/ispconfig_patch'); if(!is_link('/usr/local/bin/ispconfig_patch')) exec('ln -s /usr/local/ispconfig/server/scripts/ispconfig_patch /usr/local/bin/ispconfig_patch');
// Change mode of a few files from amavisd
if(is_file($conf['amavis']['config_dir'].'/conf.d/50-user')) chmod($conf['amavis']['config_dir'].'/conf.d/50-user', 0640);
if(is_file($conf['amavis']['config_dir'].'/50-user~')) chmod($conf['amavis']['config_dir'].'/50-user~', 0400);
if(is_file($conf['amavis']['config_dir'].'/amavisd.conf')) chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640);
if(is_file($conf['amavis']['config_dir'].'/amavisd.conf~')) chmod($conf['amavis']['config_dir'].'/amavisd.conf~', 0400);
} }
} }
......
...@@ -1189,7 +1189,13 @@ class installer extends installer_base ...@@ -1189,7 +1189,13 @@ class installer extends installer_base
// Add symlink for patch tool // Add symlink for patch tool
if(!is_link('/usr/local/bin/ispconfig_patch')) exec('ln -s /usr/local/ispconfig/server/scripts/ispconfig_patch /usr/local/bin/ispconfig_patch'); if(!is_link('/usr/local/bin/ispconfig_patch')) exec('ln -s /usr/local/ispconfig/server/scripts/ispconfig_patch /usr/local/bin/ispconfig_patch');
// Change mode of a few files from amavisd
if(is_file($conf['amavis']['config_dir'].'/conf.d/50-user')) chmod($conf['amavis']['config_dir'].'/conf.d/50-user', 0640);
if(is_file($conf['amavis']['config_dir'].'/50-user~')) chmod($conf['amavis']['config_dir'].'/50-user~', 0400);
if(is_file($conf['amavis']['config_dir'].'/amavisd.conf')) chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640);
if(is_file($conf['amavis']['config_dir'].'/amavisd.conf~')) chmod($conf['amavis']['config_dir'].'/amavisd.conf~', 0400);
} }
} }
......
...@@ -570,6 +570,7 @@ class installer_dist extends installer_base { ...@@ -570,6 +570,7 @@ class installer_dist extends installer_base {
$content = str_replace('{mysql_server_port}', $conf["mysql"]["port"], $content); $content = str_replace('{mysql_server_port}', $conf["mysql"]["port"], $content);
$content = str_replace('{mysql_server_ip}', $conf['mysql']['ip'], $content); $content = str_replace('{mysql_server_ip}', $conf['mysql']['ip'], $content);
wf($conf["amavis"]["config_dir"].'/amavisd.conf', $content); wf($conf["amavis"]["config_dir"].'/amavisd.conf', $content);
chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640);
// Adding the amavisd commands to the postfix configuration // Adding the amavisd commands to the postfix configuration
...@@ -1399,7 +1400,12 @@ class installer_dist extends installer_base { ...@@ -1399,7 +1400,12 @@ class installer_dist extends installer_base {
// Add symlink for patch tool // Add symlink for patch tool
if(!is_link('/usr/local/bin/ispconfig_patch')) exec('ln -s /usr/local/ispconfig/server/scripts/ispconfig_patch /usr/local/bin/ispconfig_patch'); if(!is_link('/usr/local/bin/ispconfig_patch')) exec('ln -s /usr/local/ispconfig/server/scripts/ispconfig_patch /usr/local/bin/ispconfig_patch');
// Change mode of a few files from amavisd
if(is_file($conf['amavis']['config_dir'].'/conf.d/50-user')) chmod($conf['amavis']['config_dir'].'/conf.d/50-user', 0640);
if(is_file($conf['amavis']['config_dir'].'/50-user~')) chmod($conf['amavis']['config_dir'].'/50-user~', 0400);
if(is_file($conf['amavis']['config_dir'].'/amavisd.conf')) chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640);
if(is_file($conf['amavis']['config_dir'].'/amavisd.conf~')) chmod($conf['amavis']['config_dir'].'/amavisd.conf~', 0400);
} }
......
...@@ -86,6 +86,9 @@ function get_distname() { ...@@ -86,6 +86,9 @@ function get_distname() {
$mainver = array_filter($mainver); $mainver = array_filter($mainver);
$mainver = current($mainver).'.'.next($mainver); $mainver = current($mainver).'.'.next($mainver);
switch ($mainver){ switch ($mainver){
case "15.04":
$relname = "(Vivid Vervet)";
break;
case "14.10": case "14.10":
$relname = "(Utopic Unicorn)"; $relname = "(Utopic Unicorn)";
break; break;
......
...@@ -1099,7 +1099,7 @@ class installer_base { ...@@ -1099,7 +1099,7 @@ class installer_base {
// amavisd user config file // amavisd user config file
$configfile = 'amavisd_user_config'; $configfile = 'amavisd_user_config';
if(is_file($conf['amavis']['config_dir'].'/conf.d/50-user')) copy($conf['amavis']['config_dir'].'/conf.d/50-user', $conf['amavis']['config_dir'].'/50-user~'); if(is_file($conf['amavis']['config_dir'].'/conf.d/50-user')) copy($conf['amavis']['config_dir'].'/conf.d/50-user', $conf['amavis']['config_dir'].'/50-user~');
if(is_file($conf['amavis']['config_dir'].'/conf.d/50-user~')) chmod($conf['amavis']['config_dir'].'/conf.d/50-user~', 0400); if(is_file($conf['amavis']['config_dir'].'/conf.d/50-user~')) chmod($conf['amavis']['config_dir'].'/50-user~', 0400);
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', 'tpl/'.$configfile.'.master'); $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', 'tpl/'.$configfile.'.master');
$content = str_replace('{mysql_server_ispconfig_user}', $conf['mysql']['ispconfig_user'], $content); $content = str_replace('{mysql_server_ispconfig_user}', $conf['mysql']['ispconfig_user'], $content);
$content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content); $content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content);
...@@ -1107,6 +1107,7 @@ class installer_base { ...@@ -1107,6 +1107,7 @@ class installer_base {
$content = str_replace('{mysql_server_port}', $conf['mysql']['port'], $content); $content = str_replace('{mysql_server_port}', $conf['mysql']['port'], $content);
$content = str_replace('{mysql_server_ip}', $conf['mysql']['ip'], $content); $content = str_replace('{mysql_server_ip}', $conf['mysql']['ip'], $content);
wf($conf['amavis']['config_dir'].'/conf.d/50-user', $content); wf($conf['amavis']['config_dir'].'/conf.d/50-user', $content);
chmod($conf['amavis']['config_dir'].'/conf.d/50-user', 0640);
// TODO: chmod and chown on the config file // TODO: chmod and chown on the config file
...@@ -2380,6 +2381,13 @@ Email Address []: ...@@ -2380,6 +2381,13 @@ Email Address []:
// Add symlink for patch tool // Add symlink for patch tool
if(!is_link('/usr/local/bin/ispconfig_patch')) exec('ln -s /usr/local/ispconfig/server/scripts/ispconfig_patch /usr/local/bin/ispconfig_patch'); if(!is_link('/usr/local/bin/ispconfig_patch')) exec('ln -s /usr/local/ispconfig/server/scripts/ispconfig_patch /usr/local/bin/ispconfig_patch');
// Change mode of a few files from amavisd
if(is_file($conf['amavis']['config_dir'].'/conf.d/50-user')) chmod($conf['amavis']['config_dir'].'/conf.d/50-user', 0640);
if(is_file($conf['amavis']['config_dir'].'/50-user~')) chmod($conf['amavis']['config_dir'].'/50-user~', 0400);
if(is_file($conf['amavis']['config_dir'].'/amavisd.conf')) chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640);
if(is_file($conf['amavis']['config_dir'].'/amavisd.conf~')) chmod($conf['amavis']['config_dir'].'/amavisd.conf~', 0400);
} }
public function configure_dbserver() { public function configure_dbserver() {
......
...@@ -43,7 +43,7 @@ if($_SESSION["s"]["user"]['active'] != 1) { ...@@ -43,7 +43,7 @@ if($_SESSION["s"]["user"]['active'] != 1) {
} }
if(!preg_match("/^[a-z]{2,20}$/i", $mod)) die('module name contains unallowed chars.'); if(!preg_match("/^[a-z]{2,20}$/i", $mod)) die('module name contains unallowed chars.');
if($redirect != '' && !preg_match("/^[a-z0-9]+\/[a-z0-9_\.\-]+\?id=[0-9]{1,7}$/i", $redirect)) die('redirect contains unallowed chars.'); if($redirect != '' && !preg_match("/^[a-z0-9]+\/[a-z0-9_\.\-]+\?id=[0-9]{1,9}$/i", $redirect)) die('redirect contains unallowed chars.');
//* Check if user may use the module. //* Check if user may use the module.
$user_modules = explode(",", $_SESSION["s"]["user"]["modules"]); $user_modules = explode(",", $_SESSION["s"]["user"]["modules"]);
......
...@@ -62,6 +62,9 @@ class monitor_tools { ...@@ -62,6 +62,9 @@ class monitor_tools {
$mainver = array_filter($mainver); $mainver = array_filter($mainver);
$mainver = current($mainver).'.'.next($mainver); $mainver = current($mainver).'.'.next($mainver);
switch ($mainver){ switch ($mainver){
case "15.04":
$relname = "(Vivid Vervet)";
break;
case "14.10": case "14.10":
$relname = "(Utopic Unicorn)"; $relname = "(Utopic Unicorn)";
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment