Add an option to override the icon which already has been set. (#723)

This commit is contained in:
Eugene
2021-01-13 16:47:15 -06:00
committed by GitHub
parent d95abfce82
commit cd0fdfc95b
2 changed files with 17 additions and 11 deletions
+4
View File
@@ -766,6 +766,10 @@ downloaded, scaled, and converted from any other image format:
docker run -d -e ICON=http://..../some/image.png ... docker run -d -e ICON=http://..../some/image.png ...
The server icon which has been set doesn't get overridden by default. It can be changed and overridden by setting `OVERRIDE_ICON` to `TRUE`.
docker run -d -e ICON=http://..../some/other/image.png -e OVERRIDE_ICON=TRUE...
### Rcon ### Rcon
To use rcon use the `ENABLE_RCON` and `RCON_PASSORD` variables. To use rcon use the `ENABLE_RCON` and `RCON_PASSORD` variables.
+3 -1
View File
@@ -14,7 +14,8 @@ if [ -n "$WHITELIST" ]; then
echo $WHITELIST | awk -v RS=, '{print}' > /data/white-list.txt echo $WHITELIST | awk -v RS=, '{print}' > /data/white-list.txt
fi fi
if [ -n "$ICON" -a ! -e server-icon.png ]; then if [ -n "$ICON" ]; then
if [ ! -e server-icon.png ] || [ "${OVERRIDE_ICON}" == "TRUE" ]; then
log "Using server icon from $ICON..." log "Using server icon from $ICON..."
# Not sure what it is yet...call it "img" # Not sure what it is yet...call it "img"
curl -sSL -o /tmp/icon.img $ICON curl -sSL -o /tmp/icon.img $ICON
@@ -25,6 +26,7 @@ if [ -n "$ICON" -a ! -e server-icon.png ]; then
log "Converting image to 64x64 PNG..." log "Converting image to 64x64 PNG..."
convert /tmp/icon.img -resize 64x64! /data/server-icon.png convert /tmp/icon.img -resize 64x64! /data/server-icon.png
fi fi
fi
fi fi
if ! isTrue ${SKIP_LOG4J_CONFIG}; then if ! isTrue ${SKIP_LOG4J_CONFIG}; then