fix setup
This commit is contained in:
parent
0f2b7e358d
commit
98290acdd0
@ -77,9 +77,14 @@ $ mkdir ~/apxtowns/dev-ants
|
|||||||
$ cd ~/apxtowns/dev-ants
|
$ cd ~/apxtowns/dev-ants
|
||||||
$ wget https://testwall-ants.ndda.fr/setup.sh
|
$ wget https://testwall-ants.ndda.fr/setup.sh
|
||||||
$ chmod +x setup.sh
|
$ chmod +x setup.sh
|
||||||
$ ./setup.sh adminapi https://testwall-ants.ndda.fr https://gitea.ndda.fr/apxtri/adminapi
|
$ . setup.sh adminapi https://testwall-ants.ndda.fr https://gitea.ndda.fr/apxtri/adminapi
|
||||||
|
```
|
||||||
|
Open http://adminapx.adminapi/index_en.html in your browser after installation. you are ready to dev in adminapi or in your tribe by following the web interface.
|
||||||
|
|
||||||
|
To add a new tribe from an existing tribe host in testwall-ants.ndda.fr, we want set a dev env from git repo named smatchit with data that come from testwall-ants.ndda.fr the last night. To get data you must have the password to access backup. Then you must set your nginx conf from the interface
|
||||||
|
```
|
||||||
|
. setup.sh smatchit https://testwall-ants.ndda.fr https://gitea.ndda.fr/smatchit/smatchit
|
||||||
```
|
```
|
||||||
Open http://dev-ants in your browser after installation. you are ready to dev in adminapi or in your tribe by following the web interface.
|
|
||||||
|
|
||||||
You can create a git project of your tribe, we add a default .gitignore to not ignore data store in object.
|
You can create a git project of your tribe, we add a default .gitignore to not ignore data store in object.
|
||||||
|
|
||||||
|
@ -137,7 +137,7 @@ apxtri.setup = async () => {
|
|||||||
// check nginx conf and eventually change if not starting by user "current user";
|
// check nginx conf and eventually change if not starting by user "current user";
|
||||||
let etcnginx = fs.readFileSync("/etc/nginx/nginx.conf", "utf8");
|
let etcnginx = fs.readFileSync("/etc/nginx/nginx.conf", "utf8");
|
||||||
if (etcnginx.split("\n")[0] !== `user ${initadminapi.sudoUser};`) {
|
if (etcnginx.split("\n")[0] !== `user ${initadminapi.sudoUser};`) {
|
||||||
const nginxmain = fs.readFileSync("../adminapi/apxtri/setup/nginx.maincf");
|
const nginxmain = fs.readFileSync("../adminapi/apxtri/setup/nginx.maincf","utf8");
|
||||||
console.log("Modify /etc/nginx/nginx.conf");
|
console.log("Modify /etc/nginx/nginx.conf");
|
||||||
fs.outputFileSync(
|
fs.outputFileSync(
|
||||||
"/etc/nginx/nginx.conf",
|
"/etc/nginx/nginx.conf",
|
||||||
|
@ -27,7 +27,8 @@ fi
|
|||||||
folderlist=$5
|
folderlist=$5
|
||||||
|
|
||||||
if [[ "$folderlist" == "*" || -z "$folderlist" ]]; then
|
if [[ "$folderlist" == "*" || -z "$folderlist" ]]; then
|
||||||
lstfile="${tribe}/${mainfolder}"
|
#carefull lstfile must start by a space
|
||||||
|
lstfile=" ${tribe}/${mainfolder}"
|
||||||
else
|
else
|
||||||
lstfile=""
|
lstfile=""
|
||||||
for folder in ${folderlist}; do
|
for folder in ${folderlist}; do
|
||||||
@ -35,7 +36,7 @@ else
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
cd "$pathtown"
|
cd "$pathtown"
|
||||||
tar -czf "${tribe}/backups/${prefix}.${mainfolder}.tar.gz" "$lstfile"
|
tar -czf "${tribe}/backups/${prefix}.${mainfolder}.tar.gz"$lstfile
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "Archive created successfully ${tribe}/backups/${prefix}.${mainfolder}.tar.gz"
|
echo "Archive created successfully ${tribe}/backups/${prefix}.${mainfolder}.tar.gz"
|
||||||
|
Loading…
Reference in New Issue
Block a user