evoacme: always strip .conf suffix
This commit is contained in:
parent
42834aa438
commit
3738a189c7
|
@ -5,7 +5,7 @@
|
||||||
[ -z "${CSR_DIR}" ] && CSR_DIR='/etc/ssl/requests'
|
[ -z "${CSR_DIR}" ] && CSR_DIR='/etc/ssl/requests'
|
||||||
[ -z "${SELF_SIGNED_DIR}" ] && SELF_SIGNED_DIR='/etc/ssl/self-signed'
|
[ -z "${SELF_SIGNED_DIR}" ] && SELF_SIGNED_DIR='/etc/ssl/self-signed'
|
||||||
|
|
||||||
vhost=$1
|
vhost=$(basename $1 .conf)
|
||||||
|
|
||||||
SSL_EMAIL=$(grep emailAddress /etc/letsencrypt/openssl.cnf|cut -d'=' -f2|xargs)
|
SSL_EMAIL=$(grep emailAddress /etc/letsencrypt/openssl.cnf|cut -d'=' -f2|xargs)
|
||||||
if [ -n "$SSL_EMAIL" ]; then
|
if [ -n "$SSL_EMAIL" ]; then
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
|
|
||||||
vhost=$1
|
vhost=$(basename $1 .conf)
|
||||||
vhostfiles=$(ls -1 /etc/{nginx,apache2}/sites-enabled/${vhost}?(.conf) 2>/dev/null)
|
vhostfiles=$(ls -1 /etc/{nginx,apache2}/sites-enabled/${vhost}?(.conf) 2>/dev/null)
|
||||||
|
|
||||||
if [ $(echo "${vhostfiles}"|wc -l) -lt 1 ]; then
|
if [ $(echo "${vhostfiles}"|wc -l) -lt 1 ]; then
|
||||||
|
|
Loading…
Reference in a new issue