mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-05-31 08:04:52 +00:00
Add an option to override the icon which already has been set. (#723)
This commit is contained in:
@@ -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.
|
||||||
|
|||||||
+13
-11
@@ -14,17 +14,19 @@ 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
|
||||||
log "Using server icon from $ICON..."
|
if [ ! -e server-icon.png ] || [ "${OVERRIDE_ICON}" == "TRUE" ]; then
|
||||||
# Not sure what it is yet...call it "img"
|
log "Using server icon from $ICON..."
|
||||||
curl -sSL -o /tmp/icon.img $ICON
|
# Not sure what it is yet...call it "img"
|
||||||
specs=$(identify /tmp/icon.img | awk '{print $2,$3}')
|
curl -sSL -o /tmp/icon.img $ICON
|
||||||
if [ "$specs" = "PNG 64x64" ]; then
|
specs=$(identify /tmp/icon.img | awk '{print $2,$3}')
|
||||||
mv /tmp/icon.img /data/server-icon.png
|
if [ "$specs" = "PNG 64x64" ]; then
|
||||||
else
|
mv /tmp/icon.img /data/server-icon.png
|
||||||
log "Converting image to 64x64 PNG..."
|
else
|
||||||
convert /tmp/icon.img -resize 64x64! /data/server-icon.png
|
log "Converting image to 64x64 PNG..."
|
||||||
fi
|
convert /tmp/icon.img -resize 64x64! /data/server-icon.png
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! isTrue ${SKIP_LOG4J_CONFIG}; then
|
if ! isTrue ${SKIP_LOG4J_CONFIG}; then
|
||||||
|
|||||||
Reference in New Issue
Block a user