@@ -1115,14 +1115,6 @@ if [ "$nginx" = 'yes' ]; then
11151115 check_result $? " php$fpm_v -fpm start failed"
11161116 fi
11171117
1118- # Redirect unassigned hosts to default "Success" page
1119- for ip in /usr/local/hestia/data/ips/* ; do
1120- ipaddr=${ip##*/ }
1121- rm -f /etc/nginx/conf.d/$ip .conf
1122- cp -f $HESTIA /install/deb/nginx/unassigned.inc /etc/nginx/conf.d/$ipaddr .conf
1123- sed -i ' s/directIP/' $ipaddr ' /g' /etc/nginx/conf.d/$ipaddr .conf
1124- done
1125-
11261118 # Install dhparam.
11271119 cp -f $HESTIA /install/deb/ssl/dhparam.pem /etc/ssl
11281120
@@ -1173,14 +1165,6 @@ if [ "$apache" = 'yes' ]; then
11731165 chmod a+x $HESTIA /data/templates/web/apache2/* .sh
11741166 fi
11751167
1176- # Add unassigned hosts configuration to apache2
1177- for ip in /usr/local/hestia/data/ips/* ; do
1178- ipaddr=${ip##*/ }
1179- rm -f /etc/apache2/conf.d/$ip .conf
1180- cp -f $HESTIA /install/deb/apache2/unassigned.conf /etc/apache2/conf.d/$ipaddr .conf
1181- sed -i ' s/directIP/' $ipaddr ' /g' /etc/apache2/conf.d/$ipaddr .conf
1182- done
1183-
11841168 update-rc.d apache2 defaults > /dev/null 2>&1
11851169 service apache2 start >> $LOG
11861170 check_result $? " apache2 start failed"
@@ -1605,6 +1589,22 @@ if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
16051589 ip=$pub_ip
16061590fi
16071591
1592+ # Add unassigned hosts configuration to webserver
1593+ for ip in $( ls /usr/local/hestia/data/ips/ 2> /dev/null) ; do
1594+
1595+ if [ " $apache " = ' yes' ]; then
1596+ rm -f /etc/apache2/conf.d/$ip .conf
1597+ cp -f $HESTIA /install/deb/apache2/unassigned.conf /etc/apache2/conf.d/$ip .conf
1598+ sed -i ' s/directIP/' $ip ' /g' /etc/apache2/conf.d/$ip .conf
1599+ fi
1600+
1601+ if [ " $nginx " = ' yes' ]; then
1602+ rm -f /etc/nginx/conf.d/$ip .conf
1603+ cp -f $HESTIA /install/deb/nginx/unassigned.inc /etc/nginx/conf.d/$ip .conf
1604+ sed -i ' s/directIP/' $ip ' /g' /etc/nginx/conf.d/$ip .conf
1605+ fi
1606+ done
1607+
16081608# Configuring MariaDB host
16091609if [ " $mysql " = ' yes' ]; then
16101610 $HESTIA /bin/v-add-database-host mysql localhost root $mpass
@@ -1710,11 +1710,13 @@ cat $tmpfile
17101710rm -f $tmpfile
17111711
17121712echo " (!) IMPORTANT: You must logout or restart the server before continuing."
1713- echo -n " Do you want to logout now? [Y/N] "
1714- read resetshell
1713+ if [ " $interactive " = ' yes' ]; then
1714+ echo -n " Do you want to logout now? [Y/N] "
1715+ read resetshell
17151716
1716- if [ " $resetshell " = " Y" ] || [ " $resetshell " = " y" ]; then
1717- logout
1717+ if [ " $resetshell " = " Y" ] || [ " $resetshell " = " y" ]; then
1718+ logout
1719+ fi
17181720fi
17191721
17201722# EOF
0 commit comments