Fix who.ini when is only: "/"
Avoid replace to "//" in 00_update_who.sh entrypoint
This commit is contained in:
parent
eba3896b44
commit
a2fa91798b
|
@ -2,8 +2,14 @@
|
||||||
|
|
||||||
# Update who.ini when exists PROXY_CKAN_LOCATION
|
# Update who.ini when exists PROXY_CKAN_LOCATION
|
||||||
echo "Update who.ini"
|
echo "Update who.ini"
|
||||||
if [ -n "$PROXY_CKAN_LOCATION" ] && [ "$PROXY_CKAN_LOCATION" != "/" ]; then \
|
if [ -n "$PROXY_CKAN_LOCATION" ] && [ "$PROXY_CKAN_LOCATION" != "/" ]; then
|
||||||
sed -i "s|\${WHO_LOCATION}|$PROXY_CKAN_LOCATION|g" ${APP_DIR}/who.ini; \
|
sed -i "s|\${WHO_LOCATION}|$PROXY_CKAN_LOCATION|g" "${APP_DIR}/who.ini";
|
||||||
else \
|
else
|
||||||
sed -i "s|\${WHO_LOCATION}|/|g" ${APP_DIR}/who.ini; \
|
# Check if the value is exactly "/"
|
||||||
fi
|
if [ "$PROXY_CKAN_LOCATION" = "/" ]; then
|
||||||
|
sed -i "s|\${WHO_LOCATION}||g" "${APP_DIR}/who.ini";
|
||||||
|
else
|
||||||
|
# Handle the case when $PROXY_CKAN_LOCATION is empty or not set
|
||||||
|
sed -i "s|\${WHO_LOCATION}|/|g" "${APP_DIR}/who.ini";
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue