257257 $ inst ->configure_apps_vhost ();
258258
259259 //* Configure Firewall
260- //* Configure Bastille Firewall
261- $ conf ['services ' ]['firewall ' ] = true ;
262- swriteln ('Configuring Bastille Firewall ' );
263- $ inst ->configure_firewall ();
260+ if ($ conf ['ufw ' ]['installed ' ] == true ) {
261+ //* Configure Ubuntu Firewall
262+ $ conf ['services ' ]['firewall ' ] = true ;
263+ swriteln ('Configuring Ubuntu Firewall ' );
264+ $ inst ->configure_ufw_firewall ();
265+ } else {
266+ //* Configure Bastille Firewall
267+ $ conf ['services ' ]['firewall ' ] = true ;
268+ swriteln ('Configuring Bastille Firewall ' );
269+ $ inst ->configure_bastille_firewall ();
270+ }
264271
265272 //* Configure Fail2ban
266273 if ($ conf ['fail2ban ' ]['installed ' ] == true ) {
328335 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 ' );
329336 //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');
330337 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 ' );
331- // 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');
338+ 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 ' );
332339}else {
333340
334341 //* In expert mode, we select the services in the following steps, only db is always available
544551
545552 //** Configure Firewall
546553 if (strtolower ($ inst ->simple_query ('Configure Firewall Server ' ,array ('y ' ,'n ' ),'y ' )) == 'y ' ) {
547- //if($conf['bastille']['installed'] == true) {
548- //* Configure Bastille Firewall
549- $ conf ['services ' ]['firewall ' ] = true ;
550- swriteln ('Configuring Bastille Firewall ' );
551- $ inst ->configure_firewall ();
552- /*} elseif($conf['ufw']['installed'] == true) {
554+ if ($ conf ['ufw ' ]['installed ' ] == true ) {
553555 //* Configure Ubuntu Firewall
554556 $ conf ['services ' ]['firewall ' ] = true ;
555557 swriteln ('Configuring Ubuntu Firewall ' );
556558 $ inst ->configure_ufw_firewall ();
559+ } else {
560+ //* Configure Bastille Firewall
561+ $ conf ['services ' ]['firewall ' ] = true ;
562+ swriteln ('Configuring Bastille Firewall ' );
563+ $ inst ->configure_bastille_firewall ();
557564 }
558- */
559565 }
560566
561567 //** Configure Firewall
622628echo "Installation completed. \n" ;
623629
624630
625- ?>
631+ ?>
0 commit comments