fix(certbot): Sourcing binary path
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
This commit is contained in:
parent
2f1df4c528
commit
af97a505e9
1 changed files with 16 additions and 18 deletions
|
|
@ -1,33 +1,31 @@
|
|||
# --- 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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue