smalenfant closed pull request #3021: Quiet installation for tomcat SysV test URL: https://github.com/apache/trafficcontrol/pull/3021
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/traffic_router/core/src/main/scripts/preinstall.sh b/traffic_router/core/src/main/scripts/preinstall.sh index 372353910..5d42a0a2f 100644 --- a/traffic_router/core/src/main/scripts/preinstall.sh +++ b/traffic_router/core/src/main/scripts/preinstall.sh @@ -14,15 +14,17 @@ # # figure out which version of traffic_router is currently running -# and then shut it down +# and then shut it down. Running both test just in case. set +e -chkconfig --list tomcat >/dev/null -if [ $? -eq 0 ]; then +if [[ -e "/etc/init.d/tomcat" ]]; then + echo "Stopping tomcat service..." /sbin/service tomcat stop -else - /usr/bin/systemctl list-unit-files traffic_router.service > /dev/null + chkconfig tomcat off +fi +if + /usr/bin/systemctl list-unit-files traffic_router.service > /dev/null [ $? -eq 0 ] && /usr/bin/systemctl stop traffic_router fi ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
