WHM/CPanel + Apache - automated replace wildcard SSL on all (sub)domains

Job ID: 36680284

Budget: $10 – $100 USD

Hi,

I am looking for a WHM/Cpanel expert that can write a script (bash, API, ...) that will automate updating a wildcard SSL certificate on all subdomains.

Situation:
- I have a WHM/Cpanel server (WHM 110, Apache 2.4, AlmaLinux v8.8.0 or Centos 7.9) with root access
- on the server, I have one website, example.com
- that website has 1000+ subdomains, such as one.example.com, two.example.com, abc.example.com, ...
- the website and all the subdomains have a Wildcard SSL certificate installed for *.example.com

Problem:
- I need to update the wildcard SSL certificate. Each subdomain needs to be updated manually, one-by-one, from the WHM user interface

Solution:
- I need a way to update the wildcard certificate for all the subdomains automatically so I don't have to do it manually

Desired functionality:
- I provide the old and new SSL certificate and RSA key
- the script searches the server for all (sub)domains using the old SSL certificate
- it creates backup of any configuration it changes
- it updates the SSL certificate for all the subdomains
- rebuilds any databases/config files necessary and restarts Apache
- provides the option to restore the backed up files if case of problems

Here's a sample Bash script that probably worked with WHM back in 2016, but doesn't work anymore:
http://interpip.es/ssl/replace-wildcard-ssl-certificate-on-all-subdomains-on-cpanel-server/

Questions? Feel free to ask.
Related categories: System Admin Linux Apache cPanel