diff --git a/README.md b/README.md index 2a6e8fd..14aff94 100644 --- a/README.md +++ b/README.md @@ -77,9 +77,14 @@ $ mkdir ~/apxtowns/dev-ants $ cd ~/apxtowns/dev-ants $ wget https://testwall-ants.ndda.fr/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. diff --git a/apxtri/apxtri.js b/apxtri/apxtri.js index ba45c2f..f036979 100755 --- a/apxtri/apxtri.js +++ b/apxtri/apxtri.js @@ -137,7 +137,7 @@ apxtri.setup = async () => { // check nginx conf and eventually change if not starting by user "current user"; let etcnginx = fs.readFileSync("/etc/nginx/nginx.conf", "utf8"); 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"); fs.outputFileSync( "/etc/nginx/nginx.conf", diff --git a/backup.sh b/backup.sh index 2081afd..3165bef 100755 --- a/backup.sh +++ b/backup.sh @@ -27,7 +27,8 @@ fi folderlist=$5 if [[ "$folderlist" == "*" || -z "$folderlist" ]]; then - lstfile="${tribe}/${mainfolder}" +#carefull lstfile must start by a space + lstfile=" ${tribe}/${mainfolder}" else lstfile="" for folder in ${folderlist}; do @@ -35,7 +36,7 @@ else done fi cd "$pathtown" -tar -czf "${tribe}/backups/${prefix}.${mainfolder}.tar.gz" "$lstfile" +tar -czf "${tribe}/backups/${prefix}.${mainfolder}.tar.gz"$lstfile if [ $? -eq 0 ]; then echo "Archive created successfully ${tribe}/backups/${prefix}.${mainfolder}.tar.gz"