Merge remote-tracking branch 'refs/remotes/origin/master' into mc-issue-47

This commit is contained in:
Geoff Bourne committed 2015-11-30 21:51:19 -06:00
commit 2f5402195c
2 files changed
+17

No files matched your search

+8
View File
@@ -170,6 +170,14 @@ Valid values are: `peaceful`, `easy`, `normal`, and `hard`, and an
error message will be output in the logs if it's not one of these error message will be output in the logs if it's not one of these
values. values.
### Whitelist Players
To whitelist players for your Minecraft server, pass the Minecraft usernames separated by commas via the `WHITELIST` environment variable, such as
docker run -d -e WHITELIST=user1,user2 ...
If the `WHITELIST` environment variable is not used, any user can join your Minecraft server if it's publicly accessible.
### Op/Administrator Players ### Op/Administrator Players
To add more "op" (aka adminstrator) users to your Minecraft server, pass the Minecraft usernames separated by commas via the `OPS` environment variable, such as To add more "op" (aka adminstrator) users to your Minecraft server, pass the Minecraft usernames separated by commas via the `OPS` environment variable, such as
+9
View File
@@ -89,6 +89,11 @@ esac
if [ ! -e server.properties ]; then if [ ! -e server.properties ]; then
cp /tmp/server.properties . cp /tmp/server.properties .
if [ -n "$WHITELIST" ]; then
sed -i "/whitelist\s*=/ c whitelist=true" /data/server.properties
sed -i "/white-list\s*=/ c white-list=true" /data/server.properties
fi
if [ -n "$MOTD" ]; then if [ -n "$MOTD" ]; then
sed -i "/motd\s*=/ c motd=$MOTD" /data/server.properties sed -i "/motd\s*=/ c motd=$MOTD" /data/server.properties
fi fi
@@ -171,6 +176,10 @@ if [ -n "$OPS" -a ! -e ops.txt.converted ]; then
echo $OPS | awk -v RS=, '{print}' >> ops.txt echo $OPS | awk -v RS=, '{print}' >> ops.txt
fi fi
if [ -n "$WHITELIST" -a ! -e white-list.txt.converted ]; then
echo $WHITELIST | awk -v RS=, '{print}' >> white-list.txt
fi
if [ -n "$ICON" -a ! -e server-icon.png ]; then if [ -n "$ICON" -a ! -e server-icon.png ]; then
echo "Using server icon from $ICON..." echo "Using server icon from $ICON..."
# Not sure what it is yet...call it "img" # Not sure what it is yet...call it "img"