|
@@ -1359,6 +1359,25 @@ function import_email {
|
1359
|
1359
|
fi
|
1360
|
1360
|
}
|
1361
|
1361
|
|
|
1362
|
+function install_web_server {
|
|
1363
|
+ if grep -Fxq "install_web_server" $COMPLETION_FILE; then
|
|
1364
|
+ return
|
|
1365
|
+ fi
|
|
1366
|
+ # remove apache
|
|
1367
|
+ apt-get -y remove --purge apache2
|
|
1368
|
+ if [ -d /etc/apache2 ]; then
|
|
1369
|
+ rm -rf /etc/apache2
|
|
1370
|
+ fi
|
|
1371
|
+ # install nginx
|
|
1372
|
+ apt-get -y --force-yes install nginx php5-fpm git
|
|
1373
|
+ # install a script to easily enable and disable nginx virtual hosts
|
|
1374
|
+ cd $INSTALL_DIR
|
|
1375
|
+ git clone https://github.com/perusio/nginx_ensite
|
|
1376
|
+ cd $INSTALL_DIR/nginx_ensite
|
|
1377
|
+ cp nginx_* /usr/sbin
|
|
1378
|
+ echo 'install_web_server' >> $COMPLETION_FILE
|
|
1379
|
+}
|
|
1380
|
+
|
1362
|
1381
|
function install_final {
|
1363
|
1382
|
if grep -Fxq "install_final" $COMPLETION_FILE; then
|
1364
|
1383
|
return
|
|
@@ -1410,6 +1429,7 @@ folders_for_email_addresses
|
1410
|
1429
|
dynamic_dns_freedns
|
1411
|
1430
|
#create_private_mailing_list
|
1412
|
1431
|
import_email
|
|
1432
|
+install_web_server
|
1413
|
1433
|
install_final
|
1414
|
1434
|
echo 'Freedombone installation is complete'
|
1415
|
1435
|
exit 0
|