| | |
| | | //} |
| | | |
| | | //** Shall the services be reconfigured during update |
| | | $reconfigure_services_answer = $inst->simple_query('Reconfigure Services?', array('yes', 'no'), 'yes','reconfigure_services'); |
| | | $reconfigure_services_answer = $inst->simple_query('Reconfigure Services?', array('yes', 'no', 'selected'), 'yes','reconfigure_services'); |
| | | |
| | | if($reconfigure_services_answer == 'yes') { |
| | | if($reconfigure_services_answer == 'yes' || $reconfigure_services_answer == 'selected') { |
| | | |
| | | if($conf['services']['mail']) { |
| | | |
| | | //** Configure postfix |
| | | if($inst->reconfigure_app('Postfix', $reconfigure_services_answer)) { |
| | | swriteln('Configuring Postfix'); |
| | | $inst->configure_postfix('dont-create-certs'); |
| | | } |
| | | |
| | | //** Configure mailman |
| | | if($conf['mailman']['installed'] == true) { |
| | | if($conf['mailman']['installed'] == true && $inst->reconfigure_app('Mailman', $reconfigure_services_answer)) { |
| | | swriteln('Configuring Mailman'); |
| | | $inst->configure_mailman('update'); |
| | | } |
| | | |
| | | //* Configure Jailkit |
| | | if($inst->reconfigure_app('Jailkit', $reconfigure_services_answer)) { |
| | | swriteln('Configuring Jailkit'); |
| | | $inst->configure_jailkit(); |
| | | } |
| | | |
| | | if($conf['dovecot']['installed'] == true) { |
| | | if($conf['dovecot']['installed'] == true && $inst->reconfigure_app('Dovecot', $reconfigure_services_answer)) { |
| | | //* Configure dovecot |
| | | swriteln('Configuring Dovecot'); |
| | | $inst->configure_dovecot(); |
| | | } else { |
| | | } elseif ($conf['courier']['installed'] == true && $inst->reconfigure_app('Courier', $reconfigure_services_answer)) { |
| | | //** Configure saslauthd |
| | | swriteln('Configuring SASL'); |
| | | $inst->configure_saslauthd(); |
| | |
| | | } |
| | | |
| | | //** Configure Spamasassin |
| | | if($inst->reconfigure_app('Spamassassin', $reconfigure_services_answer)) { |
| | | swriteln('Configuring Spamassassin'); |
| | | $inst->configure_spamassassin(); |
| | | } |
| | | |
| | | //** Configure Amavis |
| | | if($conf['amavis']['installed'] == true) { |
| | | if($conf['amavis']['installed'] == true && $inst->reconfigure_app('Amavisd', $reconfigure_services_answer)) { |
| | | swriteln('Configuring Amavisd'); |
| | | $inst->configure_amavis(); |
| | | } |
| | | |
| | | //** Configure Getmail |
| | | if ($inst->reconfigure_app('Getmail', $reconfigure_services_answer)) { |
| | | swriteln('Configuring Getmail'); |
| | | $inst->configure_getmail(); |
| | | } |
| | | |
| | | if($conf['services']['web'] && $conf['pureftpd']['installed'] == true) { |
| | | //** Configure Pureftpd |
| | | swriteln('Configuring Pureftpd'); |
| | | $inst->configure_pureftpd(); |
| | | } |
| | | |
| | | if($conf['services']['dns']) { |
| | | if($conf['services']['dns'] && $inst->reconfigure_app('DNS', $reconfigure_services_answer)) { |
| | | //* Configure DNS |
| | | if($conf['powerdns']['installed'] == true) { |
| | | swriteln('Configuring PowerDNS'); |
| | |
| | | } |
| | | |
| | | if($conf['services']['web']) { |
| | | |
| | | if($conf['pureftpd']['installed'] == true && $inst->reconfigure_app('Pureftpd', $reconfigure_services_answer)) { |
| | | //** Configure Pureftpd |
| | | swriteln('Configuring Pureftpd'); |
| | | $inst->configure_pureftpd(); |
| | | } |
| | | |
| | | if($inst->reconfigure_app('Web-Server', $reconfigure_services_answer)) { |
| | | if($conf['webserver']['server_type'] == 'apache'){ |
| | | //** Configure Apache |
| | | swriteln('Configuring Apache'); |
| | |
| | | swriteln('Configuring Apps vhost'); |
| | | $inst->configure_apps_vhost(); |
| | | } |
| | | } |
| | | |
| | | if($conf['services']['xmpp']) { |
| | | if($conf['services']['xmpp'] && $inst->reconfigure_app('XMPP', $reconfigure_services_answer)) { |
| | | //** Configure Metronome XMPP |
| | | $inst->configure_xmpp('dont-create-certs'); |
| | | } |
| | | |
| | | |
| | | //* Configure DBServer |
| | | swriteln('Configuring Database'); |
| | | $inst->configure_dbserver(); |
| | | |
| | | |
| | | if($conf['services']['firewall']) { |
| | | if($conf['services']['firewall'] && $inst->reconfigure_app('Firewall', $reconfigure_services_answer)) { |
| | | if($conf['ufw']['installed'] == true) { |
| | | //* Configure Ubuntu Firewall |
| | | $conf['services']['firewall'] = true; |
| | |
| | | } |
| | | } |
| | | |
| | | //* Configure DBServer |
| | | swriteln('Configuring Database'); |
| | | $inst->configure_dbserver(); |
| | | |
| | | /* |
| | | if($conf['squid']['installed'] == true) { |
| | | swriteln('Configuring Squid'); |