Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Add TLS support in Tomcat Script #105
Conversation
| @@ -287,10 +287,12 @@ checkIfValidTomcatHome() | |||
| eval $1="false" | |||
| #check if tomcat is configured as a service. If no, then check if we have access to startup.sh file | |||
| elif [ ! -f /etc/init.d/$SERVICE ]; then | |||
| logMsgToConfigSysLog "INFO" "INFO: Tomcat is not configured as a service" | |||
| if [ ! -f "$LOGGLY_CATALINA_HOME/bin/startup.sh" ]; then | |||
| if [[ ! $(which systemctl) && $(systemctl list-unit-files $SERVICE.service | grep "$SERVICE.service") ]] &>/dev/null; then | |||
Shwetajain148
Oct 26, 2017
Author
Contributor
@mchaudhary @mostlyjason, The actual issue with the script was if we have provided the correct CATALINA_HOME path manually using the -ch option but the script fails to find the tomcat service at the path /etc/init.d/ then it also checks for the startup.sh file at location $LOGGLY_CATALINA_HOME/bin/startup.sh. As I had also added this systemctl command in Nginx and Apache scripts to find the Nginx and Apache service, here the same things need to be added for Tomcat service. That's what I have done here. If Tomcat service couldn't be found at location /etc/ini.d/ then check with systemctl command.
Now the script is working fine if we provide the correct Catalina home path and script is able to find the tomcat service.
@mchaudhary @mostlyjason, The actual issue with the script was if we have provided the correct CATALINA_HOME path manually using the -ch option but the script fails to find the tomcat service at the path /etc/init.d/ then it also checks for the startup.sh file at location $LOGGLY_CATALINA_HOME/bin/startup.sh. As I had also added this systemctl command in Nginx and Apache scripts to find the Nginx and Apache service, here the same things need to be added for Tomcat service. That's what I have done here. If Tomcat service couldn't be found at location /etc/ini.d/ then check with systemctl command.
Now the script is working fine if we provide the correct Catalina home path and script is able to find the tomcat service.
@mchaudhary @mostlyjason In this PR I added the TLS configuration in tomcat script and --insecure parameter for the insecure logging. Currently, I am testing this new script on different distributions so testing work is in progress.
Please review.