Bugfix bash
This commit is contained in:
parent
4a59811f82
commit
c2c5adbd45
4
admin.sh
4
admin.sh
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue