whmapi1 version
This script will display your WHMAPI version. Please ensure that it is available.
In order to use this script, follow these simple steps:
- Run the following command in /etc/letsencrypt/scripts
cd /etc/letsencrypt/scripts
- Clone the project
git clone https://github.com/javadmsd/certbot-whm-command.git
-
Type
cd certbot-whm-command
and press enter. You should now be in the certbot-whm-command directory -
Type
chmod +x authenticator.sh
andchmod +x cleanup.sh
in the terminal and press enter. This will make the script executable. -
Install
certbot
package
sudo apt update
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
certbot --version
- Run the following command
certbot certonly --manual --preferred-challenges dns --server https://acme-v02.api.letsencrypt.org/directory --manual-auth-hook ./authenticator.sh --manual-cleanup-hook ./cleanup.sh -d *.example.com
If you do not receive the following message at the end, continue with the steps
Certbot has set up a scheduled task to automatically renew this certificate in the background.
- If Use the command
crontab -e
to open the cron jobs for renew certificates
crontab -e
-
Press
i
on the keyboard to insert a new line. -
Type the following line
certbot renew --manual --preferred-challenges dns --server https://acme-v02.api.letsencrypt.org/directory --manual-auth-hook /etc/letsencrypt/scripts/certbot-whm-command/authenticator.sh --manual-cleanup-hook /etc/letsencrypt/scripts/certbot-whm-command/cleanup.sh -d *.example.com >> /etc/letsencrypt/scripts/certbot-whm-command/certbot.renew.log
-
Press
Esc
. -
Type
:wq
and pressEnter
to save the changes. -
Now the script is ready to be used.