modif setup
This commit is contained in:
@@ -30,9 +30,9 @@ codekey=$4 # code to access backend of the tribe in case it is not newtribe or a
|
||||
|
||||
function help {
|
||||
echo "Need more params, cmd must be $ . setup.sh <tribename> <url to get data> <gitrepourl> <codekey to getdata>"
|
||||
echo "Example1: . setup.sh adminapi https://app1.smatchit.io https://gitea.ndda.fr/apxtri/adminapi"
|
||||
echo "Example1: . setup.sh adminapi https://app1.smatchit.io?code= 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://admin.smatchit.io 1234"
|
||||
echo "Example2: setup.sh smatchit https://admin.smatchit.io?code=1234"
|
||||
echo " install smatchit as a copy of testwall-ants.ndda.fr but not from the git (you don't need to have git acess but need to know a specific code)"
|
||||
echo "Example3: setup.sh smatchit newtribe"
|
||||
echo " create a new empty tribe"
|
||||
@@ -45,7 +45,7 @@ else
|
||||
if [ "$url" == "newtribe" ]; then
|
||||
mkdir -p "${tribe}"
|
||||
else
|
||||
wget "${url}/${tribe}/setup.objects.tar.gz?code=${codekey}" -o setup.objects.tar.gz
|
||||
wget "${url}/${tribe}/backups/setup.objects.tar.gz?code=${codekey}" -O setup.objects.tar.gz
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo "Check the url:$url that seems not answer, check with tribe's admin if your access code is still valid"
|
||||
help
|
||||
@@ -54,9 +54,9 @@ else
|
||||
#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
|
||||
if [ -z "$gitrepo" ]; then
|
||||
wget "${url}/${tribe}/setup.apxtri.tar.gz?code=${codekey}" -o setup.objects.tar.gz
|
||||
wget "${url}/${tribe}/backups/setup.apxtri.tar.gz?code=${codekey}" -O setup.objects.tar.gz
|
||||
tar -xzf setup.apxtri.tar.gz -C . -p && rm setup.apxtri.tar.gz
|
||||
wget "${url}/${tribe}/setup.schema.tar.gz?code=${codekey}" -o setup.objects.tar.gz
|
||||
wget "${url}/${tribe}/backups/setup.schema.tar.gz?code=${codekey}" -O setup.objects.tar.gz
|
||||
tar -xzf setup.schema.tar.gz -C . -p && rm setup.schema.tar.gz
|
||||
#wget "${url}/${tribe}/setup.nginx.tar.gz"
|
||||
#tar -xzf setup.nginx.tar.gz -C . -p && rm setup.nginx.tar.gz
|
||||
|
Reference in New Issue
Block a user