diff --git a/scripts/server_script.sh b/scripts/server_script.sh index 224eb17..9fdc19a 100644 --- a/scripts/server_script.sh +++ b/scripts/server_script.sh @@ -40,7 +40,8 @@ trap 'clean_up; exit 0' SIGTERM echo "[Info] Max number of logs set to $MAX_LOGS" echo "[Info] Server is starting at [$TIMESTAMP]" -$EXEC >"$LOG_DIR/latest.log" & + +$EXEC | tee "$LOG_DIR/latest.log" & SERVER_PID=$! wait $SERVER_PID @@ -49,4 +50,4 @@ EXIT_STATUS=$? clean_up echo "[Info] Server stopped at [$(date +"$LOG_DATE_FORMAT")] with exit code: $EXIT_STATUS" -sleep 5 +sleep 5 \ No newline at end of file