From cee6a5371d884d95afc11a297f16ded0734070c4 Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt <2270806+jammsen@users.noreply.github.com> Date: Fri, 26 Jan 2024 16:12:06 +0100 Subject: [PATCH] change default security check --- README.md | 3 ++- servermanager.sh | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9bf8f47..dac2d2d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Docker - Palworld Dedicated Server -[![Build Docker Image](https://github.com/jammsen/docker-palworld-dedicated-server/actions/workflows/docker-build-and-push.yml/badge.svg)](https://github.com/jammsen/docker-palworld-dedicated-server/actions/workflows/docker-build-and-push.yml) +[![Build-Status master](https://github.com/jammsen/docker-palworld-dedicated-server/actions/workflows/docker-build-and-push-prod.yml/badge.svg)](https://github.com/jammsen/docker-palworld-dedicated-server/actions/workflows/docker-build-and-push-prod.yml) +[![Build-Status develop](https://github.com/jammsen/docker-palworld-dedicated-server/actions/workflows/docker-build-and-push-develop.yml/badge.svg)](https://github.com/jammsen/docker-palworld-dedicated-server/actions/workflows/docker-build-and-push-develop.yml) ![Docker Pulls](https://img.shields.io/docker/pulls/jammsen/palworld-dedicated-server) ![Docker Stars](https://img.shields.io/docker/stars/jammsen/palworld-dedicated-server) ![Image Size](https://img.shields.io/docker/image-size/jammsen/palworld-dedicated-server/latest) diff --git a/servermanager.sh b/servermanager.sh index a2107d2..2f20239 100755 --- a/servermanager.sh +++ b/servermanager.sh @@ -329,11 +329,11 @@ function startServer() { function checkForDefaultCredentials() { echo ">>> Checking for existence of default credentials" - if [ ${ADMIN_PASSWORD} == "adminPasswordHere" ]; then + if [[ -n $ADMIN_PASSWORD ]] && [[ $ADMIN_PASSWORD == "adminPasswordHere" ]]; then echo ">>> Error: Security thread detected: Please change the default admin password. Aborting server start ..." exit 1 fi - if [ ${SERVER_PASSWORD} == "serverPasswordHere" ]; then + if [[ -n $SERVER_PASSWORD ]] && [[ $SERVER_PASSWORD == "serverPasswordHere" ]]; then echo ">>> Error: Security thread detected: Please change the default server password. Aborting server start ..." exit 1 fi