From c5c096e13341db6ee3dfda4e1b5aadeb63fca5dc Mon Sep 17 00:00:00 2001 From: philc Date: Fri, 1 Nov 2024 08:07:46 +0100 Subject: [PATCH] modif setup --- apxtri/setup/nginx.wwwscf | 4 ++-- apxtri/setup/setup.sh | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/apxtri/setup/nginx.wwwscf b/apxtri/setup/nginx.wwwscf index 91fe301..53c6933 100644 --- a/apxtri/setup/nginx.wwwscf +++ b/apxtri/setup/nginx.wwwscf @@ -26,8 +26,8 @@ location /adminapi/Checkjson.js { location /setup.sh { alias {{{townpath}}}/adminapi/apxtri/setup/setup.sh; } -location ~ ^/.*/setup.*\.tar\.gz$ { - rewrite /(.*$)/(.*$) /$1/backups/$1 break; +location ~ ^/([^/]+)/setup.*\.tar\.gz$ { + rewrite ^/([^/]+)/(setup.*\.tar\.gz)$ /$1/backups/$2 break; root /home/phil/apxtowns/testwall-ants/; } location ~* /objectimg/.*/img/ { diff --git a/apxtri/setup/setup.sh b/apxtri/setup/setup.sh index ba4c75e..981a98d 100755 --- a/apxtri/setup/setup.sh +++ b/apxtri/setup/setup.sh @@ -30,11 +30,15 @@ gitrepo=$3 # url to get apxtri code from a git repo (empty if must come from a b # get wget "${url}/${tribe}/setup.objects.tar.gz" if [[ $? -eq 0 ]]; then - echo "Check the url:$url seemas not answer" + echo "Check the url:$url seems not answer" urlko=1 fi if [[ "$urlok" -eq 1 || -z "$tribe" ]]; then - echo "Command must be setup.sh adminapi https://testwall-ants.ndda.fr https://gitea.ndda.fr/apxtri/adminapi" + echo "Need params command must be . setup.sh "i + echo "Example1: setup.sh adminapi https://testwall-ants.ndda.fr https://gitea.ndda.fr/apxtri/adminapi" + echo "install adminapi from the repo (with git accessright) and get data for adminapi from testwall-ants.nnda.fr" + echo "Example2: setup.sh smatchit https://testwall-ants.ndda.fr" + echo "install smatchit as a copy of testwall-ants.ndda.fr and not from the git" else if [ -z "$gitrepo" ]; then wget "${url}/${tribe}/setup.apxtri.tar.gz" @@ -60,4 +64,4 @@ else yarn install cd ../adminapi yarn dev -fi \ No newline at end of file +fi