mirror of
https://github.com/DerTyp7/glassminers-server-docker.git
synced 2025-10-29 21:02:10 +01:00
Added a second container that runs nightly server builds.
This commit is contained in:
@@ -1,13 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "[Info] Downloading latest server version..."
|
||||
wget https://github.com/surrealtm/Glassminers/releases/latest/download/GMServer.out -O "server.out"
|
||||
echo "[Info] Downloading server executable..."
|
||||
|
||||
LOCAL_EXECUTABLE_NAME="server_$1.out"
|
||||
|
||||
if [ "$1" = "stable" ]; then
|
||||
wget https://github.com/surrealtm/Glassminers/releases/latest/download/GMServer.out -O $LOCAL_EXECUTABLE_NAME
|
||||
elif [ "$1" = "nightly" ]; then
|
||||
wget https://github.com/surrealtm/Glassminers/raw/refs/heads/main/run_tree/server.out -O $LOCAL_EXECUTABLE_NAME
|
||||
else
|
||||
echo "[Error] Please provide either 'nightly' or 'stable' as an argument to this script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "[Error] Download failed! Aborting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
chmod 777 ./server.out
|
||||
chmod 777 $LOCAL_EXECUTABLE_NAME
|
||||
|
||||
echo "[Info] Download completed successfully."
|
||||
|
||||
@@ -4,7 +4,7 @@ MAX_LOGS=${MAX_LOGS:-20}
|
||||
LOG_DIR=${LOG_DIR:-"/var/log/glassminers"}
|
||||
LOG_DATE_FORMAT=${LOG_DATE_FORMAT:-"%Y-%m-%d-%H-%M-%S"}
|
||||
|
||||
EXEC=./server.out
|
||||
EXEC=./server_$1.out
|
||||
TIMESTAMP=$(date +"$LOG_DATE_FORMAT")
|
||||
|
||||
delete_old_logs() {
|
||||
|
||||
Reference in New Issue
Block a user