diff --git a/src/usr/lib/ocie/deploy b/src/usr/lib/ocie/deploy index b9340b7..bfa4483 100644 --- a/src/usr/lib/ocie/deploy +++ b/src/usr/lib/ocie/deploy @@ -34,7 +34,7 @@ else deploy_local="${APP_HOME}"; deploy_latest="${APP_UPDATE_PATH}/${APP_NAME}"; if [[ "${APP_TYPE}" == "tomcat" ]];then - deploy_local="${deploy_local}/${APP_NAME}.war"; + deploy_local="${APP_HOME}/${APP_NAME}.war"; deploy_latest="${APP_UPDATE_PATH}/${APP_NAME}.war"; fi; echo "Ocie: App Deploy: Deployment type is [ ${APP_TYPE} ]"; diff --git a/src/usr/lib/ocie/include/config/apache b/src/usr/lib/ocie/include/config/apache index 989874d..5f54630 100644 --- a/src/usr/lib/ocie/include/config/apache +++ b/src/usr/lib/ocie/include/config/apache @@ -69,7 +69,7 @@ else echo "Ocie: Config: Rewriting all requests to: [ https ]"; add_default; fi; - if [[ "${REWRITE_INDEX}" != "" ]];then + if [[ ! "${REWRITE_INDEX}" == "" ]];then echo "Ocie: Config: Rewriting all requests to: [ ${REWRITE_INDEX} ]"; add_framework; fi; @@ -77,15 +77,15 @@ else echo "Ocie: Config: Adding CORS config for JSON to enabled site"; add_cors; fi; - if [[ "${REWRITE_EXT}" != "" ]];then - if [[ "${REWRITE_INDEX}" != "" ]];then + if [[ ! "${REWRITE_EXT}" == "" ]];then + if [[ ! "${REWRITE_INDEX}" = "" ]];then echo "Ocie: Config: Cannot configure both [ REWRITE_INDEX ] and [ REWRITE_EXT ], using [ REWRITE_INDEX ], value ${REWRITE_INDEX}"; else echo "Ocie: Config: Rewriting all requests with the following extensions: [ ${REWRITE_EXT} ]"; add_extension; fi; fi; - if [[ "${REWRITE_EXCLUDE}" != "" ]];then + if [[ ! "${REWRITE_EXCLUDE}" == "" ]];then echo "Ocie: Config: Ecluding the following pattern from rewrite: [ ${REWRITE_EXCLUDE} ]"; add_exclude; fi; diff --git a/src/usr/lib/ocie/include/utils b/src/usr/lib/ocie/include/utils index 88bcea8..b19a65f 100644 --- a/src/usr/lib/ocie/include/utils +++ b/src/usr/lib/ocie/include/utils @@ -9,11 +9,11 @@ function get_signature() fi; if [[ ! "${option}" == "sha1" ]] && [[ ! "${option}" == "sha256" ]];then option='sha1'; - if [[ -d "${object}" ]];then - echo "$(find ${object} -type f -print0 | xargs -0 sha1sum | sort | sha1sum | cut -f1 -d' ')"; - else - echo "$(${option}sum ${object} | cut -f1 -d' ')"; - fi; + fi; + if [[ -d "${object}" ]];then + echo "$(find ${object} -type f -print0 | xargs -0 sha1sum | sort | sha1sum | cut -f1 -d' ')"; + elif [[ -f "${object}" ]];then + echo "$(${option}sum ${object} | cut -f1 -d' ')"; else echo "0"; fi;