|
@@ -3,10 +3,12 @@
|
|
#move to script directory so all relative paths work
|
|
#move to script directory so all relative paths work
|
|
cd "$(dirname "$0")"
|
|
cd "$(dirname "$0")"
|
|
|
|
|
|
|
|
+#includes
|
|
|
|
+. ./config.sh
|
|
. ./colors.sh
|
|
. ./colors.sh
|
|
-. ./arguments.sh
|
|
|
|
|
|
|
|
-verbose "Installing nginx"
|
|
|
|
|
|
+#send a message
|
|
|
|
+verbose "Installing the web server"
|
|
|
|
|
|
#install dependencies
|
|
#install dependencies
|
|
yum -y install nginx php-fpm php-gd php-pgsql php-odbc php-curl php-imap php-mcrypt php-opcache php-common php-pdo php-soap php-xml php-xmlrpc php-cli
|
|
yum -y install nginx php-fpm php-gd php-pgsql php-odbc php-curl php-imap php-mcrypt php-opcache php-common php-pdo php-soap php-xml php-xmlrpc php-cli
|
|
@@ -18,8 +20,8 @@ mkdir -p /etc/nginx/sites-enabled
|
|
#enable fusionpbx nginx config
|
|
#enable fusionpbx nginx config
|
|
cp ./nginx/fusionpbx /etc/nginx/sites-available/fusionpbx.conf
|
|
cp ./nginx/fusionpbx /etc/nginx/sites-available/fusionpbx.conf
|
|
ln -s /etc/nginx/sites-available/fusionpbx.conf /etc/nginx/sites-enabled/fusionpbx.conf
|
|
ln -s /etc/nginx/sites-available/fusionpbx.conf /etc/nginx/sites-enabled/fusionpbx.conf
|
|
-
|
|
|
|
awk '/server *{/ {c=1 ; next} c && /{/{c++} c && /}/{c--;next} !c' /etc/nginx/nginx.conf > /etc/nginx/nginx.tmp && mv -f /etc/nginx/nginx.tmp /etc/nginx/nginx.conf && rm -f /etc/nginx/nginx.tmp
|
|
awk '/server *{/ {c=1 ; next} c && /{/{c++} c && /}/{c--;next} !c' /etc/nginx/nginx.conf > /etc/nginx/nginx.tmp && mv -f /etc/nginx/nginx.tmp /etc/nginx/nginx.conf && rm -f /etc/nginx/nginx.tmp
|
|
sed -i '/include \/etc\/nginx\/conf\.d\/\*\.conf\;/a \ include \/etc\/nginx\/sites-enabled\/\*\.conf\;' /etc/nginx/nginx.conf
|
|
sed -i '/include \/etc\/nginx\/conf\.d\/\*\.conf\;/a \ include \/etc\/nginx\/sites-enabled\/\*\.conf\;' /etc/nginx/nginx.conf
|
|
|
|
|
|
-verbose "nginx installed"
|
|
|
|
|
|
+#send a message
|
|
|
|
+verbose "nginx installed"
|