Skip to content

Instantly share code, notes, and snippets.

@renanivo
renanivo / import-letsencrypt-java.sh
Created May 20, 2019 19:45 — forked from galan/import-letsencrypt-java.sh
Imports the letsencrypt certificates into the java keystore
#!/bin/bash -e
# JAVA_HOME can be passed as argument if not set
if [ ! -d $JAVA_HOME ]; then
JAVA_HOME=${1}
fi
KEYSTORE=$JAVA_HOME/jre/lib/security/cacerts
if [ ! -f "$KEYSTORE" ]; then
echo "Keystore not found in '$KEYSTORE'"
exit 1