corrected logic error in install.sh

This commit is contained in:
Paul Liverman III 2018-04-24 06:04:57 -07:00
parent ba8b703543
commit d8c6244c44

View File

@ -7,7 +7,7 @@ OPENRESTY_VERSION=1.13.6.1
LUAROCKS_VERSION=2.4.1
POSTGRES_PASSWORD=$(cat /dev/urandom | head -c 12 | base64)
if [ $1 != "dev" ]
if [ "$1" != "dev" ]
then
read -p "Enter email address for use with certbot-auto: " EMAIL_ADDRESS
read -p "Enter the domain name this will be running on: " DOMAIN_NAME
@ -25,7 +25,7 @@ then
sudo apt-get install nginx -y
fi
if ! command -v certbot-auto >/dev/null 2>&1 && [ $1 != "dev" ]
if ! command -v certbot-auto >/dev/null 2>&1 && [ "$1" != "dev" ]
then
wget https://dl.eff.org/certbot-auto
chmod a+x ./certbot-auto
@ -74,7 +74,7 @@ sudo luarocks install bcrypt
sudo luarocks install lapis-console # not used yet, but I totally will
# Certificate / TLS Security
if [ $1 != "dev" ]
if [ "$1" != "dev" ]
then
sudo nginx -s stop
sudo certbot-auto certonly --standalone --agree-tos -m $EMAIL_ADDRESS -d $DOMAIN_NAME
@ -101,7 +101,7 @@ sudo chown -R www-data:www-data ./
lapis migrate production
# As-a-Service
if [ $1 != "dev" ]
if [ "$1" != "dev" ]
then
sudo echo "[Unit]
Description=simplex server