install script testing

This commit is contained in:
VirtuBox 2018-04-30 01:35:18 +02:00
parent a3a7a80949
commit 009de00c5d
3 changed files with 13 additions and 10 deletions

View File

@ -12,19 +12,21 @@ if [ "$(id -u)" != "0" ]; then
exit 1
fi
# additionals modules choice
# ACME validation choice
echo ""
echo "Welcome to the ee-acme-sh installation."
echo ""
echo "What mode of validation you want to use with Acme.sh ?"
echo "1) Cloudflare API validation with wildcard certificate support"
echo "2) Standalone mode validation"
echo "1) Cloudflare API validation (domain/subdomain/wildcard certs)"
echo "2) Standalone mode validation (domain/subdomain certs)"
echo ""
read -r acmemode
echo ""
# install acme.sh if needed
echo "checking if acme.sh is already installed"
if [ ! -f ~/.acme.sh/acme.sh ]; then
echo "installing acme.sh"
@ -32,6 +34,8 @@ wget -O - https://get.acme.sh | sh
source ~/.bashrc
fi
# install ee-acme-cf or ee-acme-standalone
if [ "$acmemode" = "1" ]
then
mkdir -p ~/.ee-acme.sh
@ -41,8 +45,8 @@ then
echo ""
echo "What is your Cloudflare email address ? :"
read -r cf_email
echo "What is your Cloudflare API Key ?"
read -r cf_api_key
echo "What is your Cloudflare API Key ? You API Key is available on https://www.cloudflare.com/a/profile"
read -r cf_api_key
export CF_Email="$cf_email"
export CF_Key="$cf_api_key"
elif [[ "$acmemode" = "2" ]]; then
@ -55,7 +59,6 @@ else
exit 1
fi
# We're done !
echo ""
echo -e " ${CGREEN}ee-acme-sh was installed successfully !${CEND}"

View File

@ -65,7 +65,7 @@ fi
ee-acme-subdomain ()
{
echo "Enter your sub-domain name: "
echo "What is your subdomain ? "
read -r domain_name
if [ ! -f /etc/nginx/sites-available/$domain_name ];
@ -122,7 +122,7 @@ ee-acme-wildcard ()
{
clear
echo ""
echo "What is your domain ?: "
echo "What is your domain ? (without www.) "
read -r domain_name
echo ""

View File

@ -1,6 +1,6 @@
#!/bin/bash
ee-acme-www ()
ee-acme-domain ()
{
clear
echo ""
@ -80,7 +80,7 @@ fi
ee-acme-subdomain ()
{
echo "Enter your sub-domain name: "
echo "What is your subdomain ? "
read -r domain_name
if [ ! -f ~/.acme.sh/acme.sh ]; then