Skip to content

Commit 2b7797b

Browse files
committed
In beforeInstall.sh, made Tomcat run as ubuntu user.
1 parent f103726 commit 2b7797b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

scripts/beforeInstall.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ apt-get install tomcat9 -y
4949
echo "Removing Tomcat ROOT folder"
5050
rm -rf $CATALINA_HOME/webapps/ROOT
5151

52+
echo 'Setting Tomcat to run as ubuntu user'
53+
sed 's/User=tomcat/User=ubuntu/' -i /lib/systemd/system/tomcat9.service
54+
systemctl daemon-reload
55+
5256
echo "Add https to Tomcat server.xml"
5357
sed 's/<Connector port="8080"/<Connector port="8080" scheme="https"/' -i $CATALINA_HOME/conf/server.xml
5458

0 commit comments

Comments
 (0)