dayzdockerserver/files/bin/dz-common
Daniel Ceregatti cf47b7fe1f Continued work on the web UI:
XML "editor" WIP.
Add xmltree component.
Start work on shelling out to steamcmd from node.
Move script functions out of common and into individual scripts.
Update docs.
2023-06-03 21:57:14 -07:00

62 lines
1.4 KiB
Bash
Executable file

#!/usr/bin/env bash
set -eEa
# If you want/need the server and rcon ports to be different, set them here.
# The steam query port is set in serverDZ.cfg.
# Server port
port=2302
rcon_port=2303
# Don't change anything else.
# Colors
default="\e[0m"
red="\e[31m"
green="\e[32m"
yellow="\e[93m"
lightblue="\e[94m"
blue="\e[34m"
magenta="\e[35m"
cyan="\e[36m"
# DayZ release server Steam app ID. USE ONE OR THE OTHER!!
# Presumably once the Linux server is released, the binaries will come from this ID.
# But more importantly, if we have a release-compatible binary, the base files must be installed from this id,
# even if the server binary and accompanying shared object don't come from it.
#release_server_appid=223350
# Without a release binary, we must use the experimental server app id for everything.
release_server_appid=1042420
# DayZ release client SteamID. This is for mods, as only the release client has them.
release_client_appid=221100
# Common container base directories
FILES="/files"
SERVER_FILES="/serverfiles"
# Used to check if dayZ is installed
SERVER_INSTALL_FILE="${SERVER_FILES}/DayZServer"
# Steam files
STEAM_LOGIN="${HOME}/steamlogin"
STEAMCMD=steamcmd
# Other stuff
YES="${green}yes${default}"
NO="${red}no${default}"
# Convenience function
prompt_yn(){
echo -n "${1} (y|N) " >&2
read -s -n 1 a
a=$(echo ${a} | tr A-Z a-z)
echo
if [[ "${a}" = "y" ]]
then
return 0
else
return 1
fi
}