diff --git a/Docker-compose/run-docker-compose.sh b/Docker-compose/run-docker-compose.sh index b3ec8eb..afc4f0d 100755 --- a/Docker-compose/run-docker-compose.sh +++ b/Docker-compose/run-docker-compose.sh @@ -14,27 +14,17 @@ function initialize_satosa { echo "WARNING: creating directories with read/write/execute permissions to anybody" - # Array of directories to create - directories=( - "./satosa-project" - "./djangosaml2_sp" - "./mongo/db" - "./nginx/html/static" - ) - - # Loop through each directory - for dir in "${directories[@]}"; do - # Create the directory and any necessary parent directories - mkdir -p "$dir" - # Set permissions recursively to 777 - chmod -R 777 "$dir" - done - - echo "Directories created and permissions set to 777." + mkdir -p ./satosa-project + mkdir -p ./djangosaml2_sp + mkdir -p ./mongo/db + mkdir -p ./nginx/html/static if [ ! -f ./satosa-project/proxy_conf.yaml ]; then cp -R ../example/* ./satosa-project/ ; rm -R ./satosa/static/ ; else echo 'satosa-project directory is already initialized' ; fi if [ ! -f ./djangosaml2_sp/run.sh ]; then cp -R ../example_sp/djangosaml2_sp/* ./djangosaml2_sp ; else echo 'djangosaml2_sp directory is already initialided' ; fi if [ ! -f ./nginx/html/static/disco.html ]; then cp -R ../example/static/* ./nginx/html/static ; else echo 'nginx directory is already initialized' ; fi + + chmod -R 777 ./satosa-project + echo "WARNING: satosa-project permission folder set recursively to 777" } function update {