|
@@ -1117,14 +1117,12 @@ if [ "$nginx" = 'yes' ]; then
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
# Redirect unassigned hosts to default "Success" page
|
|
# Redirect unassigned hosts to default "Success" page
|
|
|
- if [ -f /usr/local/hestia/data/ips/* ]; then
|
|
|
|
|
- for ip in /usr/local/hestia/data/ips/*; do
|
|
|
|
|
- ipaddr=${ip##*/}
|
|
|
|
|
- rm -f /etc/nginx/conf.d/$ip.conf
|
|
|
|
|
- cp -f $HESTIA/install/deb/nginx/unassigned.inc /etc/nginx/conf.d/$ipaddr.conf
|
|
|
|
|
- sed -i 's/directIP/'$ipaddr'/g' /etc/nginx/conf.d/$ipaddr.conf
|
|
|
|
|
- done
|
|
|
|
|
- fi
|
|
|
|
|
|
|
+ for ip in /usr/local/hestia/data/ips/*; do
|
|
|
|
|
+ ipaddr=${ip##*/}
|
|
|
|
|
+ rm -f /etc/nginx/conf.d/$ip.conf
|
|
|
|
|
+ cp -f $HESTIA/install/deb/nginx/unassigned.inc /etc/nginx/conf.d/$ipaddr.conf
|
|
|
|
|
+ sed -i 's/directIP/'$ipaddr'/g' /etc/nginx/conf.d/$ipaddr.conf
|
|
|
|
|
+ done
|
|
|
|
|
|
|
|
# Install dhparam.
|
|
# Install dhparam.
|
|
|
cp -f $HESTIA/install/deb/ssl/dhparam.pem /etc/ssl
|
|
cp -f $HESTIA/install/deb/ssl/dhparam.pem /etc/ssl
|
|
@@ -1181,14 +1179,12 @@ if [ "$apache" = 'yes' ]; then
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
# Add unassigned hosts configuration to apache2
|
|
# Add unassigned hosts configuration to apache2
|
|
|
- if [ -f /usr/local/hestia/data/ips/* ]; then
|
|
|
|
|
- for ip in /usr/local/hestia/data/ips/*; do
|
|
|
|
|
- ipaddr=${ip##*/}
|
|
|
|
|
- rm -f /etc/apache2/conf.d/$ip.conf
|
|
|
|
|
- cp -f $HESTIA/install/deb/apache2/unassigned.conf /etc/apache2/conf.d/$ipaddr.conf
|
|
|
|
|
- sed -i 's/directIP/'$ipaddr'/g' /etc/apache2/conf.d/$ipaddr.conf
|
|
|
|
|
- done
|
|
|
|
|
- fi
|
|
|
|
|
|
|
+ for ip in /usr/local/hestia/data/ips/*; do
|
|
|
|
|
+ ipaddr=${ip##*/}
|
|
|
|
|
+ rm -f /etc/apache2/conf.d/$ip.conf
|
|
|
|
|
+ cp -f $HESTIA/install/deb/apache2/unassigned.conf /etc/apache2/conf.d/$ipaddr.conf
|
|
|
|
|
+ sed -i 's/directIP/'$ipaddr'/g' /etc/apache2/conf.d/$ipaddr.conf
|
|
|
|
|
+ done
|
|
|
|
|
|
|
|
update-rc.d apache2 defaults > /dev/null 2>&1
|
|
update-rc.d apache2 defaults > /dev/null 2>&1
|
|
|
service apache2 start >> $LOG
|
|
service apache2 start >> $LOG
|