modif setup

This commit is contained in:
philc 2024-11-01 08:07:46 +01:00
parent 1ce633cc9b
commit c5c096e133
2 changed files with 9 additions and 5 deletions

View File

@ -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/ {

View File

@ -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 <tribename> <url to get data> <gitrepourl>"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"