Initial commit

This commit is contained in:
2023-08-17 23:46:24 +03:00
commit cde7488084
10 changed files with 138 additions and 0 deletions

View File

@ -0,0 +1,20 @@
#!/bin/bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
WP_CONTENT_DIRS=(
plugins
upgrade
uploads
)
export WEB_GID=33
perms() {
sudo chown -R $UID:$WEB_GID "$1"
find "$1" -type d -exec chmod g+rwx '{}' \;
find "$1" -type f -exec chmod g+rw '{}' \;
}
for DIR in "${WP_CONTENT_DIRS[@]}"; do
perms "$SCRIPT_DIR/../wp-content/$DIR"
done