Commit 992797f7 authored by Marius Cramer's avatar Marius Cramer

Copied files from svn 3.0.5 stable branch (git migration)

parent 7b47c0aa
...@@ -285,7 +285,7 @@ $inst->configure_dbserver(); ...@@ -285,7 +285,7 @@ $inst->configure_dbserver();
//if(@is_dir('/etc/Bastille')) { //if(@is_dir('/etc/Bastille')) {
//* Configure Firewall //* Configure Firewall
swriteln('Configuring Firewall'); swriteln('Configuring Firewall');
$inst->configure_bastille_firewall(); $inst->configure_firewall();
//} //}
//** Configure ISPConfig //** Configure ISPConfig
......
...@@ -845,6 +845,7 @@ class installer_dist extends installer_base { ...@@ -845,6 +845,7 @@ class installer_dist extends installer_base {
$content = str_replace('{language}', $conf['language'], $content); $content = str_replace('{language}', $conf['language'], $content);
$content = str_replace('{timezone}', $conf['timezone'], $content); $content = str_replace('{timezone}', $conf['timezone'], $content);
$content = str_replace('{theme}', $conf['theme'], $content); $content = str_replace('{theme}', $conf['theme'], $content);
$content = str_replace('{language_file_import_enabled}', ($conf['language_file_import_enabled'] == true)?'true':'false', $content);
wf("$install_dir/interface/lib/$configfile", $content); wf("$install_dir/interface/lib/$configfile", $content);
...@@ -869,6 +870,7 @@ class installer_dist extends installer_base { ...@@ -869,6 +870,7 @@ class installer_dist extends installer_base {
$content = str_replace('{language}', $conf['language'], $content); $content = str_replace('{language}', $conf['language'], $content);
$content = str_replace('{timezone}', $conf['timezone'], $content); $content = str_replace('{timezone}', $conf['timezone'], $content);
$content = str_replace('{theme}', $conf['theme'], $content); $content = str_replace('{theme}', $conf['theme'], $content);
$content = str_replace('{language_file_import_enabled}', ($conf['language_file_import_enabled'] == true)?'true':'false', $content);
wf("$install_dir/server/lib/$configfile", $content); wf("$install_dir/server/lib/$configfile", $content);
......
...@@ -725,6 +725,7 @@ class installer extends installer_base ...@@ -725,6 +725,7 @@ class installer extends installer_base
$content = str_replace('{language}', $conf['language'], $content); $content = str_replace('{language}', $conf['language'], $content);
$content = str_replace('{timezone}', $conf['timezone'], $content); $content = str_replace('{timezone}', $conf['timezone'], $content);
$content = str_replace('{theme}', $conf['theme'], $content); $content = str_replace('{theme}', $conf['theme'], $content);
$content = str_replace('{language_file_import_enabled}', ($conf['language_file_import_enabled'] == true)?'true':'false', $content);
$this->write_config_file("$install_dir/interface/lib/$configfile", $content); $this->write_config_file("$install_dir/interface/lib/$configfile", $content);
......
...@@ -900,6 +900,7 @@ class installer_dist extends installer_base { ...@@ -900,6 +900,7 @@ class installer_dist extends installer_base {
$content = str_replace('{language}', $conf['language'], $content); $content = str_replace('{language}', $conf['language'], $content);
$content = str_replace('{timezone}', $conf['timezone'], $content); $content = str_replace('{timezone}', $conf['timezone'], $content);
$content = str_replace('{theme}', $conf['theme'], $content); $content = str_replace('{theme}', $conf['theme'], $content);
$content = str_replace('{language_file_import_enabled}', ($conf['language_file_import_enabled'] == true)?'true':'false', $content);
wf("$install_dir/interface/lib/$configfile", $content); wf("$install_dir/interface/lib/$configfile", $content);
...@@ -924,6 +925,7 @@ class installer_dist extends installer_base { ...@@ -924,6 +925,7 @@ class installer_dist extends installer_base {
$content = str_replace('{language}', $conf['language'], $content); $content = str_replace('{language}', $conf['language'], $content);
$content = str_replace('{timezone}', $conf['timezone'], $content); $content = str_replace('{timezone}', $conf['timezone'], $content);
$content = str_replace('{theme}', $conf['theme'], $content); $content = str_replace('{theme}', $conf['theme'], $content);
$content = str_replace('{language_file_import_enabled}', ($conf['language_file_import_enabled'] == true)?'true':'false', $content);
wf("$install_dir/server/lib/$configfile", $content); wf("$install_dir/server/lib/$configfile", $content);
......
...@@ -34,6 +34,8 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ...@@ -34,6 +34,8 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
error_reporting(E_ALL|E_STRICT); error_reporting(E_ALL|E_STRICT);
define('INSTALLER_RUN', true);
//** The banner on the command line //** The banner on the command line
echo "\n\n".str_repeat('-',80)."\n"; echo "\n\n".str_repeat('-',80)."\n";
echo " _____ ___________ _____ __ _ ____ echo " _____ ___________ _____ __ _ ____
...@@ -106,8 +108,9 @@ $inst->find_installed_apps(); ...@@ -106,8 +108,9 @@ $inst->find_installed_apps();
$conf['language'] = $inst->simple_query('Select language', array('en','de'), 'en'); $conf['language'] = $inst->simple_query('Select language', array('en','de'), 'en');
$conf['timezone'] = get_system_timezone(); $conf['timezone'] = get_system_timezone();
//* Set defaukt theme //* Set default theme
$conf['theme'] = 'default'; $conf['theme'] = 'default';
$conf['language_file_import_enabled'] = true;
//** Select installation mode //** Select installation mode
$install_mode = $inst->simple_query('Installation mode', array('standard','expert'), 'standard'); $install_mode = $inst->simple_query('Installation mode', array('standard','expert'), 'standard');
...@@ -257,17 +260,10 @@ if($install_mode == 'standard') { ...@@ -257,17 +260,10 @@ if($install_mode == 'standard') {
$inst->configure_apps_vhost(); $inst->configure_apps_vhost();
//* Configure Firewall //* Configure Firewall
if($conf['ufw']['installed'] == true) { //* Configure Bastille Firewall
//* Configure Ubuntu Firewall $conf['services']['firewall'] = true;
$conf['services']['firewall'] = true; swriteln('Configuring Bastille Firewall');
swriteln('Configuring Ubuntu Firewall'); $inst->configure_firewall();
$inst->configure_ufw_firewall();
} else {
//* Configure Bastille Firewall
$conf['services']['firewall'] = true;
swriteln('Configuring Bastille Firewall');
$inst->configure_bastille_firewall();
}
//* Configure Fail2ban //* Configure Fail2ban
if($conf['fail2ban']['installed'] == true) { if($conf['fail2ban']['installed'] == true) {
...@@ -335,7 +331,7 @@ if($install_mode == 'standard') { ...@@ -335,7 +331,7 @@ if($install_mode == 'standard') {
if($conf['bind']['installed'] == true && $conf['bind']['init_script'] != '' && is_executable($conf['init_scripts'].'/'.$conf['bind']['init_script'])) system($conf['init_scripts'].'/'.$conf['bind']['init_script'].' restart &> /dev/null'); if($conf['bind']['installed'] == true && $conf['bind']['init_script'] != '' && is_executable($conf['init_scripts'].'/'.$conf['bind']['init_script'])) system($conf['init_scripts'].'/'.$conf['bind']['init_script'].' restart &> /dev/null');
//if($conf['squid']['installed'] == true && $conf['squid']['init_script'] != '' && is_file($conf['init_scripts'].'/'.$conf['squid']['init_script'])) system($conf['init_scripts'].'/'.$conf['squid']['init_script'].' restart &> /dev/null'); //if($conf['squid']['installed'] == true && $conf['squid']['init_script'] != '' && is_file($conf['init_scripts'].'/'.$conf['squid']['init_script'])) system($conf['init_scripts'].'/'.$conf['squid']['init_script'].' restart &> /dev/null');
if($conf['nginx']['installed'] == true && $conf['nginx']['init_script'] != '' && is_file($conf['init_scripts'].'/'.$conf['nginx']['init_script'])) system($conf['init_scripts'].'/'.$conf['nginx']['init_script'].' restart &> /dev/null'); if($conf['nginx']['installed'] == true && $conf['nginx']['init_script'] != '' && is_file($conf['init_scripts'].'/'.$conf['nginx']['init_script'])) system($conf['init_scripts'].'/'.$conf['nginx']['init_script'].' restart &> /dev/null');
if($conf['ufw']['installed'] == true && $conf['ufw']['init_script'] != '' && is_file($conf['init_scripts'].'/'.$conf['ufw']['init_script'])) system($conf['init_scripts'].'/'.$conf['ufw']['init_script'].' restart &> /dev/null'); //if($conf['ufw']['installed'] == true && $conf['ufw']['init_script'] != '' && is_file($conf['init_scripts'].'/'.$conf['ufw']['init_script'])) system($conf['init_scripts'].'/'.$conf['ufw']['init_script'].' restart &> /dev/null');
}else{ }else{
//* In expert mode, we select the services in the following steps, only db is always available //* In expert mode, we select the services in the following steps, only db is always available
...@@ -551,17 +547,18 @@ if($install_mode == 'standard') { ...@@ -551,17 +547,18 @@ if($install_mode == 'standard') {
//** Configure Firewall //** Configure Firewall
if(strtolower($inst->simple_query('Configure Firewall Server',array('y','n'),'y')) == 'y') { if(strtolower($inst->simple_query('Configure Firewall Server',array('y','n'),'y')) == 'y') {
if($conf['ufw']['installed'] == true) { //if($conf['bastille']['installed'] == true) {
//* Configure Bastille Firewall
$conf['services']['firewall'] = true;
swriteln('Configuring Bastille Firewall');
$inst->configure_firewall();
/*} elseif($conf['ufw']['installed'] == true) {
//* Configure Ubuntu Firewall //* Configure Ubuntu Firewall
$conf['services']['firewall'] = true; $conf['services']['firewall'] = true;
swriteln('Configuring Ubuntu Firewall'); swriteln('Configuring Ubuntu Firewall');
$inst->configure_ufw_firewall(); $inst->configure_ufw_firewall();
} else {
//* Configure Bastille Firewall
$conf['services']['firewall'] = true;
swriteln('Configuring Bastille Firewall');
$inst->configure_bastille_firewall();
} }
*/
} }
//** Configure Firewall //** Configure Firewall
...@@ -629,4 +626,4 @@ if($install_mode == 'standard') { ...@@ -629,4 +626,4 @@ if($install_mode == 'standard') {
echo "Installation completed.\n"; echo "Installation completed.\n";
?> ?>
\ No newline at end of file
...@@ -132,7 +132,7 @@ class installer_base { ...@@ -132,7 +132,7 @@ class installer_base {
if(is_installed('named') || is_installed('bind') || is_installed('bind9')) $conf['bind']['installed'] = true; if(is_installed('named') || is_installed('bind') || is_installed('bind9')) $conf['bind']['installed'] = true;
if(is_installed('squid')) $conf['squid']['installed'] = true; if(is_installed('squid')) $conf['squid']['installed'] = true;
if(is_installed('nginx')) $conf['nginx']['installed'] = true; if(is_installed('nginx')) $conf['nginx']['installed'] = true;
if(is_installed('iptables') && is_installed('ufw')) $conf['ufw']['installed'] = true; // if(is_installed('iptables') && is_installed('ufw')) $conf['ufw']['installed'] = true;
if(is_installed('fail2ban-server')) $conf['fail2ban']['installed'] = true; if(is_installed('fail2ban-server')) $conf['fail2ban']['installed'] = true;
if(is_installed('vzctl')) $conf['openvz']['installed'] = true; if(is_installed('vzctl')) $conf['openvz']['installed'] = true;
if(is_dir("/etc/Bastille")) $conf['bastille']['installed'] = true;