Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added option for domain #143

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion init-letsencrypt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,28 @@ if ! [ -x "$(command -v docker-compose)" ]; then
exit 1
fi

domains=(example.org www.example.org)

# Initialize domain variable
domain=""

# Parse command-line arguments
while [[ "$#" -gt 0 ]]; do
case $1 in
-d|--domain) domain="$2"; shift ;;
*) echo "Unknown parameter: $1"; exit 1 ;;
esac
shift
done

# Check if the domain was provided
if [ -z "$domain" ]; then
echo "No domain provided. Use --domain or -d to specify a domain."
exit 1
fi

domains=($domain www.$domain)


rsa_key_size=4096
data_path="./data/certbot"
email="" # Adding a valid address is strongly recommended
Expand Down