Assuming even loading, STD pipe I get the following:
section.png
https://www.engineersedge.com/materi...pes_viewer.htm
stress.png
https://www.engineersedge.com/beam_b...flection_8.htm
The screws to the wall and the flange are your weak point... Use angle (90 degree) support brackets