Check for the log directory

This commit is contained in:
Price Hiller 2022-01-01 04:25:07 -06:00
parent 99e72dbbae
commit 65d5395958

View File

@ -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)"
}