diff --git a/Scripts/7D2D-Manage.bash b/Scripts/7D2D-Manage.bash index 258bca8..b9bb7d3 100644 --- a/Scripts/7D2D-Manage.bash +++ b/Scripts/7D2D-Manage.bash @@ -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)" }