remove usless quotes

This commit is contained in:
VirtuBox 2018-04-27 20:05:51 +02:00
parent 76d0e82cae
commit 6007357f4e
1 changed files with 9 additions and 9 deletions

View File

@ -26,7 +26,7 @@ export CF_Email="$cf_email"
export CF_Key="$cf_api_key"
fi
~/.acme.sh/acme.sh --issue -d "$domain_name" -d www.$domain_name --keylength ec-384 --standalone --pre-hook "systemctl stop nginx" --post-hook "systemctl start nginx"
~/.acme.sh/acme.sh --issue -d $domain_name -d www.$domain_name --keylength ec-384 --standalone --pre-hook "systemctl stop nginx" --post-hook "systemctl start nginx"
if [ ! -d /etc/letsencrypt/live/$domain_name ]; then
@ -59,15 +59,15 @@ fi
if [ ! -f /etc/nginx/conf.d/force-ssl-"$domain_name".conf ]; then
if [ ! -f /etc/nginx/conf.d/force-ssl-$domain_name.conf ]; then
# add the redirection from http to https
cat <<EOF >/etc/nginx/conf.d/force-ssl-"$domain_name".conf
cat <<EOF >/etc/nginx/conf.d/force-ssl-$domain_name.conf
server {
listen 80;
listen [::]:80;
server_name "$domain_name" www.$domain_name;
server_name $domain_name www.$domain_name;
return 301 https://$domain_name\$request_uri;
}
EOF
@ -96,7 +96,7 @@ export CF_Key="$cf_api_key"
fi
# issue cert
~/.acme.sh/acme.sh --issue -d "$domain_name" --keylength ec-384 --standalone --pre-hook "systemctl stop nginx" --post-hook "systemctl start nginx"
~/.acme.sh/acme.sh --issue -d $domain_name --keylength ec-384 --standalone --pre-hook "systemctl stop nginx" --post-hook "systemctl start nginx"
if [ ! -d /etc/letsencrypt/live/$domain_name ]; then
@ -104,7 +104,7 @@ if [ ! -d /etc/letsencrypt/live/$domain_name ]; then
mkdir -p /etc/letsencrypt/live/$domain_name
fi
if [ ! -f /etc/nginx/conf.d/force-ssl-"$domain_name".conf ]; then
if [ ! -f /etc/nginx/conf.d/force-ssl-$domain_name.conf ]; then
# add certificate to the nginx vhost configuration
cat <<EOF >/var/www/$domain_name/conf/nginx/ssl.conf
listen 443 ssl http2;
@ -116,9 +116,9 @@ cat <<EOF >/var/www/$domain_name/conf/nginx/ssl.conf
EOF
fi
if [ ! -f /etc/nginx/conf.d/force-ssl-"$domain_name".conf ]; then
if [ ! -f /etc/nginx/conf.d/force-ssl-$domain_name.conf ]; then
# add the redirection from http to https
cat <<EOF >/etc/nginx/conf.d/force-ssl-"$domain_name".conf
cat <<EOF >/etc/nginx/conf.d/force-ssl-$domain_name.conf
server {
listen 80;
listen [::]:80;
@ -129,7 +129,7 @@ EOF
fi
# install the cert and reload nginx
.acme.sh/acme.sh --install-cert -d "$domain_name" --ecc \
.acme.sh/acme.sh --install-cert -d $domain_name --ecc \
--cert-file /etc/letsencrypt/live/$domain_name/cert.pem \
--key-file /etc/letsencrypt/live/$domain_name/key.pem \
--fullchain-file /etc/letsencrypt/live/$domain_name/fullchain.pem \