Fixed login anonymous by moving it forward in line, servers now run in a loop that will restart them on crash
This commit is contained in:
parent
8d948d7af6
commit
94d0c59955
@ -129,9 +129,7 @@ start_server() {
|
||||
fi
|
||||
|
||||
log "info" "Creating new session for $(important "${server_name}") as session $(important "${server_session_name}")"
|
||||
tmux new-session -d -s "${server_session_name}" "${server_directory}/"startserver.sh \
|
||||
-configfile="${server_directory}/"serverconfig.xml
|
||||
|
||||
tmux new-session -d -s "${server_session_name}" ~/.bin/7D2D-Serv-Handler "${server_directory}"
|
||||
log "info" "Finished starting $(important "${server_name}") on port $(important "${server_port}") as tmux session $(important "${server_session_name}")"
|
||||
|
||||
}
|
||||
@ -234,7 +232,7 @@ install() {
|
||||
exit 1
|
||||
|
||||
log "info" "Installing $(important "${server_name}") to $(important "${server_directory}")"
|
||||
steamcmd +login anonymous +force_install_dir "${server_directory}" +app_update 294420 validate +quit
|
||||
steamcmd +force_install_dir "${server_directory}" +login anonymous +app_update 294420 validate +quit
|
||||
mkdir -p "${server_directory}/Mods"
|
||||
log "info" "Successfully installed $(important "${server_name}") to $(important "${server_directory}")"
|
||||
}
|
||||
@ -293,7 +291,7 @@ update() {
|
||||
gzip > "${backup_full_path}"
|
||||
tar -czf "${server_directory}" "${backup_dir}"/
|
||||
log "info" "Updating server $(important "${server_name}") located at $(important "${server_directory}")..."
|
||||
steamcmd +login anonymous +force_install_dir "${server_directory}" +app_update 294420 validate +quit
|
||||
steamcmd +force_install_dir "${server_directory}" +login anonymous +app_update 294420 validate +quit
|
||||
|
||||
log "info" "Finished updating $(important "${server_name}") located at $(important "${server_directory}")"
|
||||
|
||||
|
4
CentOS/7-Days-To-Die/7D2D-Serv-Handler.bash
Normal file
4
CentOS/7-Days-To-Die/7D2D-Serv-Handler.bash
Normal file
@ -0,0 +1,4 @@
|
||||
until "${1}/"startserver.sh -configfile="${1}/"serverconfig.xml; do
|
||||
echo "Server died with code $?, restarting in 60 seconds..." >&2
|
||||
sleep 60;
|
||||
done
|
Loading…
Reference in New Issue
Block a user