Bugfix bash

This commit is contained in:
sudoers 2019-08-14 16:12:43 +00:00
parent 4a59811f82
commit c2c5adbd45
1 changed files with 2 additions and 2 deletions

View File

@ -7,11 +7,11 @@ for byod in /home/*/byod; do
domain=$(cat $byod)
echo "$user is requesting $domain"
if [ -s /etc/nginx/sites-enabled/byod-$user-$domain.conf ]; then
echo "byod already configured for $user and $domain"
echo "byod already configured for $user at $domain"
continue
else
domainip=$(dig +short a $domain)
if [ "$bestip" == "$domainip"]
if [ "$bestip" == "$domainip" ]
then
sed -e "s/<user>/$user/" -e "s/<domain>/$domain/" template.conf \
> /etc/nginx/sites-available/byod-$user-$domain.conf