Skip to content

Instantly share code, notes, and snippets.

@MParvin
Created December 31, 2022 11:59
Show Gist options
  • Save MParvin/be8f690f00ae6d27b7221186a713a648 to your computer and use it in GitHub Desktop.
Save MParvin/be8f690f00ae6d27b7221186a713a648 to your computer and use it in GitHub Desktop.
Certbot DNS script, This script is used to generate a certificate using DNS challenge.
#!/bin/bash
if ! [ -x "$(command -v certbot)" ]; then
echo 'Error: certbot is not installed.' >&2
exit 1
fi
if [ -z "$1" ]; then
echo "Usage: $0 domain_name"
exit 1
fi
certbot -d $1 --manual --preferred-challenges dns certonly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment