Skip to content

Commit

Permalink
In beforeInstall.sh, made Tomcat run as ubuntu user.
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffreykwan committed Dec 16, 2020
1 parent f103726 commit 2b7797b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/beforeInstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ apt-get install tomcat9 -y
echo "Removing Tomcat ROOT folder"
rm -rf $CATALINA_HOME/webapps/ROOT

echo 'Setting Tomcat to run as ubuntu user'
sed 's/User=tomcat/User=ubuntu/' -i /lib/systemd/system/tomcat9.service
systemctl daemon-reload

echo "Add https to Tomcat server.xml"
sed 's/<Connector port="8080"/<Connector port="8080" scheme="https"/' -i $CATALINA_HOME/conf/server.xml

Expand Down

0 comments on commit 2b7797b

Please sign in to comment.