-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathstop.sh
More file actions
18 lines (13 loc) · 585 Bytes
/
stop.sh
File metadata and controls
18 lines (13 loc) · 585 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env bash
cd "$(dirname "$(readlink -f "$0" || realpath "$0")")"
if [ -f .env ]
then
export $(cat .env | sed 's/#.*//g' | xargs)
fi
act_user=$(id -u)
docker exec -d $COMPOSE_PROJECT_NAME-$DATABASE chown -R $act_user /var/lib/mysql
docker exec -d $COMPOSE_PROJECT_NAME-$DATABASE chown -R $act_user /var/log/mysql
docker exec -d $COMPOSE_PROJECT_NAME-$PHPVERSION chown -R $act_user /var/www/html
docker exec -d $COMPOSE_PROJECT_NAME-$PHPVERSION chown -R $act_user /var/log/apache2
CURRENT_UID=$(id -u):$(id -g) docker compose down
#read -p "Press any key to resume ..."