Skip to content

Commit

Permalink
fix: demo satosa-project folder permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
peppelinux committed Nov 14, 2024
1 parent 9e0e0c3 commit bdb81f6
Showing 1 changed file with 7 additions and 17 deletions.
24 changes: 7 additions & 17 deletions Docker-compose/run-docker-compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit bdb81f6

Please sign in to comment.