diff --git a/apxtri/setup/setup.sh b/apxtri/setup/setup.sh index bcdb2e2..6a39034 100755 --- a/apxtri/setup/setup.sh +++ b/apxtri/setup/setup.sh @@ -42,16 +42,16 @@ if [[ "$urlok" -eq 1 || -z "$tribe" ]]; then else if [ -z "$gitrepo" ]; then wget "${url}/${tribe}/setup.apxtri.tar.gz" - tar -xzvf setup.apxtri.tar.gz -C . -p && rm setup.apxtri.tar.gz + tar -xzf setup.apxtri.tar.gz -C . -p && rm setup.apxtri.tar.gz wget "${url}/${tribe}/setup.schema.tar.gz" - tar -xzvf setup.schema.tar.gz -C . -p && rm setup.schema.tar.gz + tar -xzf setup.schema.tar.gz -C . -p && rm setup.schema.tar.gz wget "${url}/${tribe}/setup.nginx.tar.gz" - tar -xzvf setup.nginx.tar.gz -C . -p && rm setup.nginx.tar.gz + tar -xzf setup.nginx.tar.gz -C . -p && rm setup.nginx.tar.gz echo "please change your dns accordingly with ${tribe}/nginx/ conf file" else git clone "$gitrepo" fi - tar -xzvf setup.objects.tar.gz -C . -p && rm setup.objects.tar.gz + tar -xzf setup.objects.tar.gz -C . -p && rm setup.objects.tar.gz mkdir -p "${tribe}/objects/persons" mkdir -p "${tribe}/objects/persons/itm" mkdir -p "${tribe}/objects/persons/idx" @@ -60,7 +60,8 @@ else mkdir -p "${tribe}/logs/nginx" mkdir -p "${tribe}/backups" # add 127.0.0.1 local host - grep -q '^127.0.0.1 adminapx.adminapi' /etc/hosts || echo '127.0.0.1 adminapx.adminapi' | sudo tee -a /etc/hosts > /dev/null + dns=$(basename "$PWD" | sed 's/-/./g') + grep -q "^127.0.0.1 $dns" /etc/hosts || echo "127.0.0.1 $dns" | sudo tee -a /etc/hosts > /dev/null cd "$tribe" yarn install cd ../adminapi