Update to be in line with main repository #5

Merged
jiriks74 merged 11 commits from master into master 2022-05-15 14:24:56 +02:00
Showing only changes of commit 80acbe974d - Show all commits

@ -410,11 +410,13 @@ update_welcome_page() {
WELCOME_PAGE="${APP_DIR}-example/welcome/docker.html" WELCOME_PAGE="${APP_DIR}-example/welcome/docker.html"
if [[ -e $WELCOME_PAGE ]]; then if [[ -e $WELCOME_PAGE ]]; then
DOCKER_CONTAINER_ID=$(basename $(cat /proc/1/cpuset)) DOCKER_CONTAINER_ID=$(basename $(cat /proc/1/cpuset))
if [[ -x $(command -v docker) ]]; then if (( ${#DOCKER_CONTAINER_ID} >= 12 )); then
DOCKER_CONTAINER_NAME=$(docker inspect --format="{{.Name}}" $DOCKER_CONTAINER_ID) if [[ -x $(command -v docker) ]]; then
sed 's/$(sudo docker ps -q)/'"${DOCKER_CONTAINER_NAME#/}"'/' -i $WELCOME_PAGE DOCKER_CONTAINER_NAME=$(docker inspect --format="{{.Name}}" $DOCKER_CONTAINER_ID)
else sed 's/$(sudo docker ps -q)/'"${DOCKER_CONTAINER_NAME#/}"'/' -i $WELCOME_PAGE
sed 's/$(sudo docker ps -q)/'"${DOCKER_CONTAINER_ID::12}"'/' -i $WELCOME_PAGE else
sed 's/$(sudo docker ps -q)/'"${DOCKER_CONTAINER_ID::12}"'/' -i $WELCOME_PAGE
fi
fi fi
fi fi
} }