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.
Status to configsyslog.loggly.com #57
Conversation
Added function to send script logs to configsyslog.loggly.com
| #!/bin/bash | ||
|
|
||
| #This script needs to be run as a sudo user | ||
| if [[ $EUID -ne 0 ]]; then |
mchaudhary
May 1, 2014
Contributor
Not sure why the script need to be run as root all the time. Customer might not have privilege
Not sure why the script need to be run as root all the time. Customer might not have privilege
ghost
May 1, 2014
I think it needs root to restart the rsyslog service
I think it needs root to restart the rsyslog service
| #if not, search it throughout the system. If we find no entries or more than | ||
| #1 entry, then we cannot determine the version of the tomcat | ||
| if [ $(sudo find / -name catalina.jar | grep tomcat6 | wc -l) = 1 ]; then | ||
| CATALINA_JAR_PATH=$(sudo find / -name catalina.jar | grep tomcat6) |
mchaudhary
May 1, 2014
Contributor
Please log the home path which you discovered based on the catalina log. The other thing is this might take time to discover so we need to show the message to customer saying "Discovering the Catalina home. It might take some time." Once done finding the home. Have another message display "found the home
Please log the home path which you discovered based on the catalina log. The other thing is this might take time to discover so we need to show the message to customer saying "Discovering the Catalina home. It might take some time." Once done finding the home. Have another message display "found the home
ghost
May 1, 2014
Oh wow I wasn't imagining searching the whole system. I thought we could just check in two places. Only the yum install location, the apt-get location, and nothing else.
Oh wow I wasn't imagining searching the whole system. I thought we could just check in two places. Only the yum install location, the apt-get location, and nothing else.
ghost
May 1, 2014
If it's tomcat7 then we should say we don't support it yet. I would hate to break their system because we haven't tested it yet.
If it's tomcat7 then we should say we don't support it yet. I would hate to break their system because we haven't tested it yet.
| #check if tomcat is configured as a service. If no, then check if we have access to catalina.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/catalina.sh" ]; then |
mchaudhary
May 1, 2014
Contributor
Why we need to exit if we don't find catalina.sh file.
Why we need to exit if we don't find catalina.sh file.
|
Jayant please look at my comments on the pull request. |
|
Looking into these. I will notify you when all the updates will be done. |
| checkIfValidCatalinaHome "/usr/share/$1" | ||
| ;; | ||
| *"CentOS"* ) | ||
| checkIfValidCatalinaHome "/usr/share/$1" |
ghost
May 1, 2014
Yeah this is fine I don't think we need the search unless Manoj think it's a good idea
Yeah this is fine I don't think we need the search unless Manoj think it's a good idea
Added function to send script logs to configsyslog.loggly.com