Aktualizovat adjust.sh
All checks were successful
Build Minecraft Image / Build-Minecraft-Stats-Image (push) Successful in 1m3s
All checks were successful
Build Minecraft Image / Build-Minecraft-Stats-Image (push) Successful in 1m3s
This commit is contained in:
parent
7a6770d7f8
commit
0f5d537640
@ -5,18 +5,16 @@ if [ -z "$HOSTNAME" ]; then
|
|||||||
echo "hostname environment variable is not set."
|
echo "hostname environment variable is not set."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
# Get the hostname of the container
|
||||||
|
HOSTNAME=$(hostname)
|
||||||
# Path to the file you want to modify
|
# Path to the file you want to modify
|
||||||
mkdir -p "/data/plugins/ChatControlRed"
|
mkdir -p "/data/plugins/ChatControlRed"
|
||||||
FILE_PATH="/data/plugins/ChatControlRed/bungee.yml"
|
FILE_PATH="/data/plugins/ChatControlRed/bungee.yml"
|
||||||
|
|
||||||
# Replace the line in the file
|
# Replace the line in the file
|
||||||
sed -i "s/^Server_Name: server_name/Server_Name: $HOSTNAME/" "$FILE_PATH"
|
sed -i "s/^Server_Name: 'server_name'/Server_Name: '$HOSTNAME'/" $FILE_PATH
|
||||||
|
|
||||||
FILE_PATH="/data/server.properties"
|
FILE_PATH="/data/server.properties"
|
||||||
|
|
||||||
# Get the hostname of the container
|
|
||||||
HOSTNAME=$(hostname)
|
|
||||||
|
|
||||||
# Create or overwrite the server.properties file with the hostname
|
# Create or overwrite the server.properties file with the hostname
|
||||||
echo "server-name: $HOSTNAME" > "$FILE_PATH"
|
echo "server-name: $HOSTNAME" > "$FILE_PATH"
|
Loading…
Reference in New Issue
Block a user