Commit bedf79c4 authored by Florian Schaal's avatar Florian Schaal

show warnings for missing services in the standard-setup instead of force_configure

parent 4e5e9b5a
...@@ -248,11 +248,11 @@ if($install_mode == 'standard') { ...@@ -248,11 +248,11 @@ if($install_mode == 'standard') {
$inst->add_database_server_record(); $inst->add_database_server_record();
//* Configure Postgrey //* Configure Postgrey
$force = @($conf['postgrey']['installed']) ? true : $inst->force_configure_app('Postgrey'); $force = @($conf['postgrey']['installed']) ? true : $inst->force_configure_app('Postgrey', false);
if($force) swriteln('Configuring Postgrey'); if($force) swriteln('Configuring Postgrey');
//* Configure Postfix //* Configure Postfix
$force = @($conf['postfix']['installed']) ? true : $inst->force_configure_app('Postfix'); $force = @($conf['postfix']['installed']) ? true : $inst->force_configure_app('Postfix', false);
if($force) { if($force) {
swriteln('Configuring Postfix'); swriteln('Configuring Postfix');
$inst->configure_postfix(); $inst->configure_postfix();
...@@ -262,7 +262,7 @@ if($install_mode == 'standard') { ...@@ -262,7 +262,7 @@ if($install_mode == 'standard') {
if($conf['services']['mail']) { if($conf['services']['mail']) {
//* Configure Mailman //* Configure Mailman
$force = @($conf['mailman']['installed']) ? true : $inst->force_configure_app('Mailman'); $force = @($conf['mailman']['installed']) ? true : $inst->force_configure_app('Mailman', false);
if($force) { if($force) {
swriteln('Configuring Mailman'); swriteln('Configuring Mailman');
$inst->configure_mailman(); $inst->configure_mailman();
...@@ -270,8 +270,8 @@ if($install_mode == 'standard') { ...@@ -270,8 +270,8 @@ if($install_mode == 'standard') {
//* Check for Dovecot and Courier //* Check for Dovecot and Courier
if(!$conf['dovecot']['installed'] && !$conf['courier']['installed']) { if(!$conf['dovecot']['installed'] && !$conf['courier']['installed']) {
$conf['dovecot']['installed'] = $inst->force_configure_app('Dovecot'); $conf['dovecot']['installed'] = $inst->force_configure_app('Dovecot', false);
$conf['courier']['installed'] = $inst->force_configure_app('Courier'); $conf['courier']['installed'] = $inst->force_configure_app('Courier', false);
} }
//* Configure Mailserver - Dovecot or Courier //* Configure Mailserver - Dovecot or Courier
if($conf['dovecot']['installed'] && $conf['courier']['installed']) { if($conf['dovecot']['installed'] && $conf['courier']['installed']) {
...@@ -298,21 +298,21 @@ if($install_mode == 'standard') { ...@@ -298,21 +298,21 @@ if($install_mode == 'standard') {
} }
//* Configure Spamasassin //* Configure Spamasassin
$force = @($conf['spamassassin']['installed']) ? true : $inst->force_configure_app('Spamassassin'); $force = @($conf['spamassassin']['installed']) ? true : $inst->force_configure_app('Spamassassin', false);
if($force) { if($force) {
swriteln('Configuring Spamassassin'); swriteln('Configuring Spamassassin');
$inst->configure_spamassassin(); $inst->configure_spamassassin();
} }
//* Configure Amavis //* Configure Amavis
$force = @($conf['amavis']['installed']) ? true : $inst->force_configure_app('Amavisd'); $force = @($conf['amavis']['installed']) ? true : $inst->force_configure_app('Amavisd', false);
if($force) { if($force) {
swriteln('Configuring Amavisd'); swriteln('Configuring Amavisd');
$inst->configure_amavis(); $inst->configure_amavis();
} }
//* Configure Getmail //* Configure Getmail
$force = @($conf['getmail']['installed']) ? true : $inst->force_configure_app('Getmail'); $force = @($conf['getmail']['installed']) ? true : $inst->force_configure_app('Getmail', false);
if($force) { if($force) {
swriteln('Configuring Getmail'); swriteln('Configuring Getmail');
$inst->configure_getmail(); $inst->configure_getmail();
...@@ -322,9 +322,9 @@ if($install_mode == 'standard') { ...@@ -322,9 +322,9 @@ if($install_mode == 'standard') {
//* Check for DNS //* Check for DNS
if(!$conf['powerdns']['installed'] && !$conf['bind']['installed'] && !$conf['mydns']['installed']) { if(!$conf['powerdns']['installed'] && !$conf['bind']['installed'] && !$conf['mydns']['installed']) {
$conf['powerdns']['installed'] = $inst->force_configure_app('PowerDNS'); $conf['powerdns']['installed'] = $inst->force_configure_app('PowerDNS', false);
$conf['bind']['installed'] = $inst->force_configure_app('BIND'); $conf['bind']['installed'] = $inst->force_configure_app('BIND', false);
$conf['mydns']['installed'] = $inst->force_configure_app('MyDNS'); $conf['mydns']['installed'] = $inst->force_configure_app('MyDNS', false);
} }
//* Configure PowerDNS //* Configure PowerDNS
if($conf['powerdns']['installed']) { if($conf['powerdns']['installed']) {
...@@ -346,14 +346,14 @@ if($install_mode == 'standard') { ...@@ -346,14 +346,14 @@ if($install_mode == 'standard') {
} }
//* Configure Jailkit //* Configure Jailkit
$force = @($conf['jailkit']['installed']) ? true : $inst->force_configure_app('Jailkit'); $force = @($conf['jailkit']['installed']) ? true : $inst->force_configure_app('Jailkit', false);
if($force) { if($force) {
swriteln('Configuring Jailkit'); swriteln('Configuring Jailkit');
$inst->configure_jailkit(); $inst->configure_jailkit();
} }
//* Configure Pureftpd //* Configure Pureftpd
$force = @($conf['pureftpd']['installed']) ? true : $inst->force_configure_app('pureftpd'); $force = @($conf['pureftpd']['installed']) ? true : $inst->force_configure_app('pureftpd', false);
if($force) { if($force) {
swriteln('Configuring Pureftpd'); swriteln('Configuring Pureftpd');
$inst->configure_pureftpd(); $inst->configure_pureftpd();
...@@ -361,8 +361,8 @@ if($install_mode == 'standard') { ...@@ -361,8 +361,8 @@ if($install_mode == 'standard') {
//* Check for Web-Server //* Check for Web-Server
if(!$conf['apache']['installed'] && !$conf['nginx']['installed']) { if(!$conf['apache']['installed'] && !$conf['nginx']['installed']) {
$conf['apache']['installed'] = $inst->force_configure_app('Apache'); $conf['apache']['installed'] = $inst->force_configure_app('Apache', false);
$conf['nginx']['installed'] = $inst->force_configure_app('nginx'); $conf['nginx']['installed'] = $inst->force_configure_app('nginx', false);
} }
//* Configure Webserver - Apache or nginx //* Configure Webserver - Apache or nginx
...@@ -382,7 +382,7 @@ if($install_mode == 'standard') { ...@@ -382,7 +382,7 @@ if($install_mode == 'standard') {
$conf['services']['web'] = true; $conf['services']['web'] = true;
$conf['services']['file'] = true; $conf['services']['file'] = true;
//* Configure Vlogger //* Configure Vlogger
$force = @($conf['vlogger']['installed']) ? true : $inst->force_configure_app('vlogger'); $force = @($conf['vlogger']['installed']) ? true : $inst->force_configure_app('vlogger', false);
if($force) { if($force) {
swriteln('Configuring vlogger'); swriteln('Configuring vlogger');
$inst->configure_vlogger(); $inst->configure_vlogger();
...@@ -406,7 +406,7 @@ if($install_mode == 'standard') { ...@@ -406,7 +406,7 @@ if($install_mode == 'standard') {
} }
//* Configure XMPP //* Configure XMPP
$force = @($conf['xmpp']['installed']) ? true : $inst->force_configure_app('Metronome XMPP Server'); $force = @($conf['xmpp']['installed']) ? true : $inst->force_configure_app('Metronome XMPP Server', false);
if($force) { if($force) {
swriteln('Configuring Metronome XMPP Server'); swriteln('Configuring Metronome XMPP Server');
$inst->configure_xmpp(); $inst->configure_xmpp();
...@@ -415,8 +415,8 @@ if($install_mode == 'standard') { ...@@ -415,8 +415,8 @@ if($install_mode == 'standard') {
//* Check for Firewall //* Check for Firewall
if(!$conf['ufw']['installed'] && !$conf['firewall']['installed']) { if(!$conf['ufw']['installed'] && !$conf['firewall']['installed']) {
$conf['ufw']['installed'] = $inst->force_configure_app('Ubuntu Firewall'); $conf['ufw']['installed'] = $inst->force_configure_app('Ubuntu Firewall', false);
$conf['firewall']['installed'] = $inst->force_configure_app('Bastille Firewall'); $conf['firewall']['installed'] = $inst->force_configure_app('Bastille Firewall', false);
} }
//* Configure Firewall - Ubuntu or Bastille //* Configure Firewall - Ubuntu or Bastille
if($conf['ufw']['installed'] && $conf['firewall']['installed']) { if($conf['ufw']['installed'] && $conf['firewall']['installed']) {
...@@ -441,14 +441,14 @@ if($install_mode == 'standard') { ...@@ -441,14 +441,14 @@ if($install_mode == 'standard') {
} }
//* Configure Fail2ban //* Configure Fail2ban
$force = @($conf['fail2ban']['installed']) ? true : $inst->force_configure_app('Fail2ban'); $force = @($conf['fail2ban']['installed']) ? true : $inst->force_configure_app('Fail2ban', false);
if($force) { if($force) {
swriteln('Configuring Fail2ban'); swriteln('Configuring Fail2ban');
$inst->configure_fail2ban(); $inst->configure_fail2ban();
} }
//* Configure OpenVZ //* Configure OpenVZ
$force = @($conf['openvz']['installed']) ? true : $inst->force_configure_app('OpenVZ'); $force = @($conf['openvz']['installed']) ? true : $inst->force_configure_app('OpenVZ', false);
if($force) { if($force) {
$conf['services']['vserver'] = true; $conf['services']['vserver'] = true;
swriteln('Configuring OpenVZ'); swriteln('Configuring OpenVZ');
...@@ -873,4 +873,4 @@ chmod($md5_filename,0700); ...@@ -873,4 +873,4 @@ chmod($md5_filename,0700);
echo "Installation completed.\n"; echo "Installation completed.\n";
?> ?>
\ No newline at end of file
...@@ -164,13 +164,14 @@ class installer_base { ...@@ -164,13 +164,14 @@ class installer_base {
if ($conf['services']['web'] && (($conf['apache']['installed'] && is_file($conf['apache']["vhost_conf_enabled_dir"]."/000-ispconfig.vhost")) || ($conf['nginx']['installed'] && is_file($conf['nginx']["vhost_conf_enabled_dir"]."/000-ispconfig.vhost")))) $this->ispconfig_interface_installed = true; if ($conf['services']['web'] && (($conf['apache']['installed'] && is_file($conf['apache']["vhost_conf_enabled_dir"]."/000-ispconfig.vhost")) || ($conf['nginx']['installed'] && is_file($conf['nginx']["vhost_conf_enabled_dir"]."/000-ispconfig.vhost")))) $this->ispconfig_interface_installed = true;
} }
public function force_configure_app($service) { public function force_configure_app($service, $enable_force=true) {
$force = false; $force = false;
swriteln("[WARN] autodetect for $service failed"); swriteln("[WARN] autodetect for $service failed");
if(strtolower($this->simple_query("Force configure $service", array('y', 'n'), 'n') ) == 'y') { if($enable_force) {
// swriteln("Configure $service"); if(strtolower($this->simple_query("Force configure $service", array('y', 'n'), 'n') ) == 'y') {
$force = true; $force = true;
} else swriteln("Skipping $service\n"); } else swriteln("Skipping $service\n");
}
return $force; return $force;
} }
......
...@@ -48,7 +48,7 @@ $nanny_details_level = 2; # nanny verbosity: 1: traditional, 2: detailed ...@@ -48,7 +48,7 @@ $nanny_details_level = 2; # nanny verbosity: 1: traditional, 2: detailed
@local_domains_maps = ( [".$mydomain"] ); # list of all local domains @local_domains_maps = ( [".$mydomain"] ); # list of all local domains
@mynetworks = qw( 00.0.0.0/8 127.0.0.0/8 [::1] [FE80::]/10 [FEC0::]/10 @mynetworks = qw( 0.0.0.0/8 127.0.0.0/8 [::1] [FE80::]/10 [FEC0::]/10
10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 ); 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 );
$unix_socketname = "$MYHOME/amavisd.sock"; # amavisd-release or amavis-milter $unix_socketname = "$MYHOME/amavisd.sock"; # amavisd-release or amavis-milter
......
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