Variable renamed

This commit is contained in:
Price Hiller 2022-01-01 18:00:54 -06:00
parent d884bb2cf8
commit e29fb39f5b

View File

@ -224,13 +224,13 @@ start_server() {
local server_port
local telnet_port
local allocs_port
local web_control_port
# This multiplication gives us 5 available ports for this server, safely allows us to block off ports efficiently
server_port="$((PRIMARY_START_PORT_RANGE + $(("${server_id}" * 7))))"
server_port="${SERVER_PORT:-$server_port}"
telnet_port="$((server_port + 4))"
allocs_port="$((server_port + 5))"
web_control_port="$((server_port + 5))"
telnet_port="${TELNET_PORT:-$telnet_port}"
log "info" "Generating a few required directories in $(important "${server_directory}")"
@ -254,7 +254,7 @@ start_server() {
elif [[ "${REPLY}" = *"property name=\"TelnetPort\""* ]]; then
printf "\t%s\n" "<property name=\"TelnetPort\" value=\"${telnet_port}\" />"
elif [[ "${REPLY}" = *"property name=\"ControlPanelPort\""* ]]; then
printf "\t%s\n" "<property name=\"ControlPanelPort\" value=\"${allocs_port}\" />"
printf "\t%s\n" "<property name=\"ControlPanelPort\" value=\"${web_control_port}\" />"
else
printf "%s\n" "${REPLY}"
fi
@ -286,7 +286,7 @@ start_server() {
log "warning" "$(important "xmllint") not installed or not in PATH, skipping lint check"
fi
log "info" "Starting $(important "${server_name}") located at $(important "${server_directory}") on game port $(important "${server_port}"), telnet port $(important "${telnet_port}"), control panel port $(important "${allocs_port}")"
log "info" "Starting $(important "${server_name}") located at $(important "${server_directory}") on game port $(important "${server_port}"), telnet port $(important "${telnet_port}"), control panel port $(important "${web_control_port}")"
if tmux has-session -t "${server_session_name}" >/dev/null 2>&1; then
log "warning" "$(important "${server_name}") is currently running"