diff --git a/backend/entrypoint.sh b/backend/entrypoint.sh index 12a29ae7..91292208 100755 --- a/backend/entrypoint.sh +++ b/backend/entrypoint.sh @@ -9,7 +9,8 @@ if [ ! -f "/proc/net/if_inet6" ]; then fi # patch the web base href if requested -if [ ! -z $BASE_HREF ]; then +INDEX_HTML=/var/www/web/kitchenowl/index.html +if [ ! -z $BASE_HREF ] && [ -f "$INDEX_HTML" ]; then if [[ $BASE_HREF == *"#"* ]]; then echo "$ME: error: BASE_HREF must not contain character '#'" >&2 exit 1 @@ -20,7 +21,7 @@ if [ ! -z $BASE_HREF ]; then echo "$ME: error: BASE_HREF must end with a forward slash: /example/" >&2 exit 1 fi - sed -i "s###g" /var/www/web/kitchenowl/index.html + sed -i "s###g" "$INDEX_HTML" fi mkdir -p $STORAGE_PATH/upload @@ -28,4 +29,4 @@ flask db upgrade if [ "${SKIP_UPGRADE_DEFAULT_ITEMS}" != "true" ] && [ "${SKIP_UPGRADE_DEFAULT_ITEMS}" != "True" ]; then python upgrade_default_items.py fi -uwsgi "$@" \ No newline at end of file +uwsgi "$@"