fix(certbot): Sourcing binary path
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
This commit is contained in:
parent
f3ff23f4bb
commit
eb677df004
1 changed files with 17 additions and 19 deletions
|
|
@ -1,36 +1,34 @@
|
|||
# --- helper functions for logs ---
|
||||
info()
|
||||
{
|
||||
echo '[INFO] ' "$@"
|
||||
info() {
|
||||
echo '[INFO] ' "$@"
|
||||
}
|
||||
warn()
|
||||
{
|
||||
echo '[WARN] ' "$@" >&2
|
||||
warn() {
|
||||
echo '[WARN] ' "$@" >&2
|
||||
}
|
||||
fatal()
|
||||
{
|
||||
echo '[ERROR] ' "$@" >&2
|
||||
exit 1
|
||||
fatal() {
|
||||
echo '[ERROR] ' "$@" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
export PATH=/var/lib/openreplay:$PATH
|
||||
|
||||
read -p "enter openreplay domain name: " domain
|
||||
nslookup $domain > /dev/null || {
|
||||
fatal "Domain name does not have ip associated with it. Please check your DNS record."
|
||||
nslookup $domain >/dev/null || {
|
||||
fatal "Domain name does not have ip associated with it. Please check your DNS record."
|
||||
}
|
||||
|
||||
# Reading email address for ssl certificate
|
||||
[[ -z $EMAIL_ADDRESS ]] && {
|
||||
read -p "Enter your email address for letsencrypt certificate: " EMAIL_ADDRESS
|
||||
echo
|
||||
read -p "Enter your email address for letsencrypt certificate: " EMAIL_ADDRESS
|
||||
echo
|
||||
}
|
||||
if [[ "$EMAIL_ADDRESS" =~ ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$ ]]
|
||||
then
|
||||
info "Email address $EMAIL_ADDRESS is valid."
|
||||
if [[ "$EMAIL_ADDRESS" =~ ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$ ]]; then
|
||||
info "Email address $EMAIL_ADDRESS is valid."
|
||||
else
|
||||
fatal "Email address $EMAIL_ADDRESS is invalid."
|
||||
fatal "Email address $EMAIL_ADDRESS is invalid."
|
||||
fi
|
||||
|
||||
sed -i "s/email: .*/email: \"${EMAIL_ADDRESS}\"/g" clusterIssuer.yaml
|
||||
sudo sed -i "s/email: .*/email: \"${EMAIL_ADDRESS}\"/g" clusterIssuer.yaml
|
||||
info "Installing cert-manager for auto letsencrypt certificate"
|
||||
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.8.0/cert-manager.crds.yaml
|
||||
helm repo add jetstack https://charts.jetstack.io
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue