Commit b771139c authored by tbrehm's avatar tbrehm
Browse files

Improved debian installer.

parent 3a94180e
...@@ -154,7 +154,7 @@ rm -rf jailkit-2.11* ...@@ -154,7 +154,7 @@ rm -rf jailkit-2.11*
8) Install fail2ban (optional but recomended, because the monitor tries to show the log) 8) Install fail2ban (optional but recomended, because the monitor tries to show the log)
More info at: http://www.howtoforge.com/fail2ban_debian_etch More info at: http://www.howtoforge.com/fail2ban_debian_etch
apt-get install fail2ban apt-get -y install fail2ban
9) Install ISPConfig 3 9) Install ISPConfig 3
......
...@@ -259,10 +259,14 @@ function mkdirs($strPath, $mode = '0755'){ ...@@ -259,10 +259,14 @@ function mkdirs($strPath, $mode = '0755'){
function rf($file){ function rf($file){
clearstatcache(); clearstatcache();
if(!$fp = fopen ($file, 'rb')){ if(is_file($file)) {
ilog('WARNING: could not open file '.$file); if(!$fp = fopen ($file, 'rb')){
ilog('WARNING: could not open file '.$file);
}
return filesize($file) > 0 ? fread($fp, filesize($file)) : '';
} else {
return '';
} }
return filesize($file) > 0 ? fread($fp, filesize($file)) : '';
} }
function wf($file, $content){ function wf($file, $content){
......
...@@ -729,7 +729,7 @@ class installer_base { ...@@ -729,7 +729,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["courier"]["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~')) exec('chmod 400 '.$conf["amavis"]["config_dir"].'/conf.d/50-user~'); if(is_file($conf["amavis"]["config_dir"].'/conf.d/50-user~')) exec('chmod 400 '.$conf["amavis"]["config_dir"].'/conf.d/50-user~');
$content = rf("tpl/".$configfile.".master"); $content = rf("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);
...@@ -841,7 +841,7 @@ class installer_base { ...@@ -841,7 +841,7 @@ class installer_base {
} }
if(is_file('/etc/inetd.conf')) { if(is_file('/etc/inetd.conf')) {
replaceLine('/etc/inetd.conf','ftp stream tcp nowait root /usr/sbin/tcpd /usr/sbin/pure-ftpd-wrapper','#ftp stream tcp nowait root /usr/sbin/tcpd /usr/sbin/pure-ftpd-wrapper',1,0); replaceLine('/etc/inetd.conf','/usr/sbin/pure-ftpd-wrapper','#ftp stream tcp nowait root /usr/sbin/tcpd /usr/sbin/pure-ftpd-wrapper',0,0);
if(is_file('/etc/init.d/openbsd-inetd')) exec('/etc/init.d/openbsd-inetd restart'); if(is_file('/etc/init.d/openbsd-inetd')) exec('/etc/init.d/openbsd-inetd restart');
} }
......
Supports Markdown
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