logMsgToConfigSysLog "INFO""INFO: Tomcat seems not to be configured with log4j logger."
}
canTomcatBeRestarted()
{
whiletrue;do
read -p "Tomcat needs to be restarted during configuration. Do you wish to continue? (yes/no)" yn
case$ynin
[Yy]* )
break;;
[Nn]* )
logMsgToConfigSysLog "WARN""WARN: This script must restart Tomcat. Please run the script again when you are ready to restart it. No changes have been made to your system. Exiting."
exit 1
break;;
* ) echo"Please answer yes or no.";;
esac
done
}
#backup the logging.properties file in the CATALINA_HOME folder
backupLoggingPropertiesFile()
{
@@ -423,7 +444,6 @@ write21TomcatConfFile()
#function to write the contents of tomcat syslog config file
logMsgToConfigSysLog "INFO""INFO: $SERVICE is running."
if [ -f /etc/init.d/$SERVICE ];then
logMsgToConfigSysLog "INFO""INFO: $SERVICE is running as service."
logMsgToConfigSysLog "INFO""INFO: Restarting the tomcat service."
sudo service $SERVICE restart
if [ $?-ne 0 ];then
logMsgToConfigSysLog "WARNING""WARNING: Tomcat did not restart gracefully. Log rotation may not be disabled. Please restart tomcat manually."
fi
break;;
[Nn]* )
logMsgToConfigSysLog "INFO""INFO: Exiting the script based on your input. Please restart Tomcat manually."
break;;
* ) echo"Please answer yes or no.";;
esac
done
else
logMsgToConfigSysLog "INFO""INFO: $SERVICE is not running as service."
logMsgToConfigSysLog "INFO""INFO: Shutting down tomcat."
sudo $LOGGLY_CATALINA_HOME/bin/shutdown.sh
if [ $?-ne 0 ];then
logMsgToConfigSysLog "WARNING""WARNING: Tomcat did not shut down gracefully."
else
logMsgToConfigSysLog "INFO""INFO: Done shutting down tomcat."
fi
logMsgToConfigSysLog "INFO""INFO: Starting up tomcat."
sudo $LOGGLY_CATALINA_HOME/bin/startup.sh
if [ $?-ne 0 ];then
logMsgToConfigSysLog "WARNING""WARNING: Tomcat did not start up down gracefully."
else
logMsgToConfigSysLog "INFO""INFO: Tomcat is up and running."
fi
fi
fi
}
#display usage syntax
ProTip!
Use n and p to navigate between commits in a pull request.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.
We use optional third-party analytics cookies to understand how you use GitHub.com so we can build better products.
Learn more.
We use optional third-party analytics cookies to understand how you use GitHub.com so we can build better products.
You can always update your selection by clicking Cookie Preferences at the bottom of the page.
For more information, see our Privacy Statement.
Essential cookies
We use essential cookies to perform essential website functions, e.g. they're used to log you in.
Learn more
Always active
Analytics cookies
We use analytics cookies to understand how you use our websites so we can make them better, e.g. they're used to gather information about the pages you visit and how many clicks you need to accomplish a task.
Learn more
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
Added modular scripts - Tomcat, Apache2, File Monitorin, S3 File Monitoring and Nginx Server #69
Added modular scripts - Tomcat, Apache2, File Monitorin, S3 File Monitoring and Nginx Server #69
Changes from 1 commit
a24007e7d10190b12a1f14160bca8e46033040fcaf3f133cd1e00b42c6b391f1de793f318770bdc77925e6d46ebafb9a362868b89cb88b8fb0115f9dee3dc38e2117169324a4200fd934bfbbc06f4412fa1b62221ae7d6bfe0a4520cf4b301d22a45d63e96dc6197df9a98ed38bffdca35323ad5d6e6363752d2cc4bf09404891f114f566d138ef2faac29fab45d7e9be5085d2364a89e96a0304c2ffe6302c24385df450f9c864d8fee9382cac6726c54ab7c64f4b3e7a73283d44e13beccd2a9d522f8151b89ecc077959787d9529d982bbc505b9cfb1435dcab5502f3cf7eb8abcd07eac676a9436f9991e9fbc22bc309919125cda8b4bc7d1e727dbf18ab84686db7f7443a2d377e408af5520e0ef389892538b62c0fc716576fd0d7654e389371118c5ba05c43ab896a25d17eca27e7bc4cb0d9732b55c6803e0cb2603c5b2dac442f49cfdb4ccf1c248476a5efFile filter...
Jump to…
Stop of the user do not want to restart tomcat