[fix-tomcat-warnings] - verified if the Tomcat service has been installed

This commit is contained in:
GuiLeme 2022-07-01 12:06:41 -03:00
parent baf7aa857a
commit 0b0cf2f6bf

View File

@ -419,15 +419,15 @@ start_bigbluebutton () {
if systemctl list-units --full -all | grep -q $TOMCAT_USER.service; then
TOMCAT_SERVICE=$TOMCAT_USER
fi
systemctl start $TOMCAT_SERVICE || {
echo
echo "# Warning: $TOMCAT_SERVICE could not be started. Please, check BBB-LTI or BBB-Demo."
echo "# Run the command:"
echo "# sudo journalctl -u $TOMCAT_SERVICE"
echo "# To better understand the ERROR"
}
systemctl start $TOMCAT_SERVICE || {
echo
echo "# Warning: $TOMCAT_SERVICE could not be started. Please, check BBB-LTI or BBB-Demo."
echo "# Run the command:"
echo "# sudo journalctl -u $TOMCAT_SERVICE"
echo "# To better understand the ERROR"
}
fi
systemctl start nginx freeswitch $REDIS_SERVICE bbb-apps-akka bbb-fsesl-akka bbb-rap-resque-worker bbb-rap-starter.service bbb-rap-caption-inbox.service $HTML5 $WEBHOOKS $ETHERPAD $PADS $BBB_WEB $BBB_LTI
@ -1143,17 +1143,29 @@ check_state() {
if bbb-conf --status | grep -q inactive; then
if bbb-conf --status | grep -q tomcat9; then
echo "# Warning: $TOMCAT_SERVICE is not started correctly"
echo "#"
echo "# $(bbb-conf --status | grep inactive | grep $TOMCAT_SERVICE)"
echo "#"
fi
if bbb-conf --status | grep inactive | grep -vq tomcat9; then
if systemctl list-units --full -all | grep -q $TOMCAT_USER.service; then
TOMCAT_SERVICE=$TOMCAT_USER
if bbb-conf --status | grep -q $TOMCAT_SERVICE; then
echo "# Warning: $TOMCAT_SERVICE is not started correctly"
echo "#"
echo "# $(bbb-conf --status | grep inactive | grep $TOMCAT_SERVICE)"
echo "#"
fi
if bbb-conf --status | grep inactive | grep -vq $TOMCAT_SERVICE; then
echo "# Error: Detected some processes have not started correctly"
echo "#"
echo "# $(bbb-conf --status | grep inactive | grep -v $TOMCAT_SERVICE)"
echo "#"
fi
else
if bbb-conf --status | grep inactive; then
echo "# Error: Detected some processes have not started correctly"
echo "#"
echo "# $(bbb-conf --status | grep inactive | grep -v $TOMCAT_SERVICE)"
echo "# $(bbb-conf --status | grep inactive)"
echo "#"
fi
fi
fi