+ winter restore perms quick helper
* wordpress quick script moved into subfolder
This commit is contained in:
8
winter/quick/_settings.sh.example
Normal file
8
winter/quick/_settings.sh.example
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
SETTINGS_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
# exporting variables dot not effect to visibility for other scripts - all variables is visible
|
||||
|
||||
export TMP_DIR=$SETTINGS_SCRIPT_DIR/tmp
|
||||
|
||||
export THEME=demo
|
29
winter/quick/restore-perms.sh.example
Normal file
29
winter/quick/restore-perms.sh.example
Normal file
@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
. "$SCRIPT_DIR/_settings.sh" || {
|
||||
echo "no settings" && exit 1
|
||||
}
|
||||
|
||||
APP_DIR="${SCRIPT_DIR}/.."
|
||||
|
||||
PLUGINS=(winter)
|
||||
THEME_DIRS=(layouts pages partials)
|
||||
export WEB_GID=33
|
||||
|
||||
perms() {
|
||||
sudo chown -R $UID:$WEB_GID "$1"
|
||||
|
||||
sudo chmod -R g+rwx "$1"
|
||||
}
|
||||
|
||||
perms "${APP_DIR}/storage"
|
||||
perms "${APP_DIR}/bootstrap/cache"
|
||||
|
||||
for DIR in "${THEME_DIRS[@]}"; do
|
||||
perms "${APP_DIR}/themes/$THEME/$DIR"
|
||||
done
|
||||
|
||||
for DIR in "${PLUGINS[@]}"; do
|
||||
perms "${APP_DIR}/plugins/$DIR"
|
||||
done
|
2
wordpress/wp-content/uploads/.gitignore
vendored
Normal file
2
wordpress/wp-content/uploads/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
Reference in New Issue
Block a user