Check for the log directory
This commit is contained in:
parent
99e72dbbae
commit
65d5395958
@ -649,6 +649,11 @@ view() {
|
||||
server_directory="${BASE_DIR}/${server_name}"
|
||||
server_log_dir="${server_directory}/7DaysToDieServer_Data"
|
||||
|
||||
if [[ ! -d "${server_log_dir}" ]]; then
|
||||
log "error" "Could not find a log directory for $(important "${server_name}") at $(important "${server_name}"), does the server exist?"
|
||||
return 1
|
||||
fi
|
||||
|
||||
tail -f "$(ls -t "${server_log_dir}"/output_log* | head -1)"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user