Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TLS support in Tomcat Script #105

Merged
merged 4 commits into from Nov 6, 2017
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Added systemctl command to check for tomcat service

  • Loading branch information
Cloud User
Cloud User committed Oct 26, 2017
commit 95f82e757000edd54df635e73327e09673e52b1e
@@ -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

This comment has been minimized.

@Shwetajain148

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.

logMsgToConfigSysLog "INFO" "INFO: Tomcat is not configured as a service."
if [ ! -f "$LOGGLY_CATALINA_HOME/bin/startup.sh" ]; then
logMsgToConfigSysLog "WARN" "WARN: Unable to find bin/startup.sh file within $LOGGLY_CATALINA_HOME."
eval $1="false"
fi
fi
fi
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.