Skip to content

Commit

Permalink
Merge pull request thijsvanloef#281 from win5923/server_password_fix
Browse files Browse the repository at this point in the history
Fix: with no `SERVER_PASSWORD` can still apply setting
  • Loading branch information
thijsvanloef committed Feb 5, 2024
2 parents 438f04c + 0449ebe commit b4e5b41
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ if [ -n "${SERVER_PASSWORD}" ]; then
SERVER_PASSWORD=$(sed -e 's/^"\(.*\)"$/\1/' -e "s/^'\(.*\)'$/\1/" <<< "$SERVER_PASSWORD")
echo "SERVER_PASSWORD=${SERVER_PASSWORD}"
sed -E -i "s/ServerPassword=\"[^\"]*\"/ServerPassword=\"$SERVER_PASSWORD\"/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini
elif [ -z "${SERVER_PASSWORD}" ]; then
printf "\033[0;31mNO SERVER_PASSWORD SET\033[0m\n"
sed -E -i "s/ServerPassword=\"[^\"]*\"/ServerPassword=\"\"/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini
fi
if [ -n "${ADMIN_PASSWORD}" ]; then
ADMIN_PASSWORD=$(sed -e 's/^"\(.*\)"$/\1/' -e "s/^'\(.*\)'$/\1/" <<< "$ADMIN_PASSWORD")
Expand Down

0 comments on commit b4e5b41

Please sign in to comment.