Fix additional issues detected by Sonarqube.

This commit is contained in:
Dave Page committed 2022-08-10 10:36:47 +01:00
1 parent 9c418188ee
commit d7ad375232
4 files changed
+3 -7

No files matched your search

-1
View File
@@ -12,7 +12,6 @@ _setup_env() {
APP_REVISION=`grep "^APP_REVISION" web/config.py | cut -d"=" -f2 | sed 's/ //g'`
APP_NAME=`grep "^APP_NAME" web/config.py | cut -d"=" -f2 | sed "s/'//g" | sed 's/^ //' | sed 's/ //g' | tr '[:upper:]' '[:lower:]'`
APP_LONG_VERSION=${APP_RELEASE}.${APP_REVISION}
APP_SHORT_VERSION=`echo ${APP_LONG_VERSION} | cut -d . -f1,2`
APP_SUFFIX=`grep "^APP_SUFFIX" web/config.py | cut -d"=" -f2 | sed 's/ //g' | sed "s/'//g"`
if [ ! -z ${APP_SUFFIX} ]; then
APP_LONG_VERSION=${APP_LONG_VERSION}-${APP_SUFFIX}
+2 -2
View File
@@ -121,7 +121,7 @@ if [ ${IS_DEBIAN} == 1 ]; then
esac
fi
APACHE_STATUS=`ps cax | grep ${APACHE}`
ps cax | grep ${APACHE} > /dev/null
if [ $? -eq 0 ]; then
if [ ${AUTOMATED} == 1 ]; then
RESPONSE=Y
@@ -131,7 +131,7 @@ if [ $? -eq 0 ]; then
case ${RESPONSE} in
y|Y )
systemctl restart ${APACHE}
systemctl restart ${APACHE}
if [ $? != 0 ]; then
echo "Error restarting ${APACHE}. Please check the systemd logs"
else