fix - DELETE_IMAGES

This commit is contained in:
bluethon 2019-01-15 18:40:46 +08:00 committed by Joxit
parent 2f014c1d8f
commit ea79fd621f
1 changed files with 4 additions and 4 deletions

View File

@ -3,16 +3,16 @@ $@
sed -i "s,\${URL},${URL}," scripts/docker-registry-ui.js
sed -i "s,\${REGISTRY_TITLE},${REGISTRY_TITLE}," scripts/docker-registry-ui.js
if [ -z "${DELETE_IMAGES}" ] || [ "${DELETE_IMAGES}" = false ] ; then
sed -i "s/registryUI.isImageRemoveActivated *= *[^,;]*/registryUI.isImageRemoveActivated=false/" scripts/docker-registry-ui.js
if [[ -z "${DELETE_IMAGES}" ]] || [[ "${DELETE_IMAGES}" = false ]] ; then
sed -i -r "s/(isImageRemoveActivated[:=])[^,;]*/\1false/" scripts/docker-registry-ui.js
fi
if [ -n "${REGISTRY_URL}" ] ; then
if [[ -n "${REGISTRY_URL}" ]] ; then
sed -i "s,\${REGISTRY_URL},${REGISTRY_URL}," /etc/nginx/conf.d/default.conf
sed -i "s,#!,," /etc/nginx/conf.d/default.conf
fi
if [ -z "$@" ]; then
if [[ -z "$@" ]]; then
nginx -g "daemon off;"
else
$@