2048 bit Diffie-Hellman Params are too weak

There is nothing secret about those DH parameters.
So if you trust these guys, you can just download the latest dhparam file here, no need to calculate them yourself.

It’s just a wget in your install script.