@@ -56,7 +56,7 @@ systemctl daemon-reload
5656echo " Add https to Tomcat server.xml"
5757sed ' s/<Connector port="8080"/<Connector port="8080" scheme="https"/' -i $CATALINA_HOME /conf/server.xml
5858
59- echo " Downlading setenv.sh Tomcat file "
59+ echo " Copying setenv.sh file to Tomcat bin folder "
6060cp $BUILD_FILES /setenv.sh /usr/share/tomcat9/bin/setenv.sh
6161
6262echo " Restarting Tomcat"
@@ -72,7 +72,13 @@ apt-get install nginx -y
7272echo " Adding Nginx www-data user to tomcat group"
7373usermod -a -G tomcat www-data
7474
75- echo " Downloading WISE Nginx config file"
75+ echo " Adding ip to nginx.conf"
76+ sed ' s/http {/http {\n add_header ip $server_addr;/' -i /etc/nginx/nginx.conf
77+
78+ echo " Adding gzip_types to nginx.conf"
79+ sed ' s/gzip on;/gzip on;\n gzip_types text\/plain text\/xml image\/gif image\/jpeg image\/png image\/svg+xml application\/json application\/javascript application\/x-javascript text\/javascript text\/css;/' -i /etc/nginx/nginx.conf
80+
81+ echo " Copying WISE Nginx config file to Nginx sites-enabled folder"
7682rm -f /etc/nginx/sites-enabled/*
7783cp $BUILD_FILES /$env /wise.conf /etc/nginx/sites-enabled/wise.conf
7884systemctl restart nginx
@@ -82,7 +88,7 @@ mkdir -p $HOME/build-folder/WEB-INF/classes
8288sudo -u ubuntu -g ubuntu mkdir $HOME /backup
8389sudo -u ubuntu -g tomcat mkdir $HOME /googleTokens
8490
85- echo " Downloading application.properties file"
91+ echo " Copying application.properties file to the build folder "
8692cp $BUILD_FILES /$env /application.properties $BUILD_DIR /WEB-INF/classes/application.properties
8793
8894echo " Installing network drive package"
@@ -92,16 +98,24 @@ echo "Mounting network drive folders"
9298cp $BUILD_FILES /$env /fstab /etc/fstab
9399mount -a
94100
95- echo " Downloading .vimrc file"
101+ echo " Copying .vimrc file to the ubuntu home folder "
96102sudo -u ubuntu -g ubuntu cp $BUILD_FILES /.vimrc $HOME /.vimrc
97103
98- echo " Downloading text to append to .bashrc"
104+ echo " Appending text to .bashrc"
99105cat $BUILD_FILES /append-to-bashrc.txt >> ~ /.bashrc
106+ cat $BUILD_FILES /$env /append-to-bashrc.txt >> ~ /.bashrc
100107source ~ /.bashrc
101108
109+ echo " Copying message of the day file to update-motd.d folder to display notes on login"
110+ cp $BUILD_FILES /99-notes /etc/update-motd.d/99-notes
111+ cat $BUILD_FILES /$env /append-to-99-notes.txt >> /etc/update-motd.d/99-notes
112+ chmod 755 /etc/update-motd.d/99-notes
113+
114+ echo " Install mysql client"
115+ apt-get install mysql-client-core-8.0 -y
116+
117+ echo " Install redis client"
118+ apt-get install redis-tools -y
119+
102120echo " Installing tree"
103121apt-get install tree -y
104-
105- echo " Downloading message of the day script to display notes"
106- cp $BUILD_FILES /99-notes /etc/update-motd.d/99-notes
107- chmod 755 /etc/update-motd.d/99-notes
0 commit comments