mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-06 06:45:05 +01:00
Adds quotes around usages that may be of a user defined directory
Co-authored-by: Felix E <felix@eckhofer.com>
This commit is contained in:
parent
d118f4a3f0
commit
332a9fac5a
1 changed files with 2 additions and 2 deletions
|
|
@ -28,7 +28,7 @@ initialize() {
|
|||
# Check for overrides of certain folders
|
||||
map_folders
|
||||
|
||||
for dir in ${DATA_DIR} ${DATA_DIR}/index ${MEDIA_ROOT_DIR} ${MEDIA_ROOT_DIR}/documents ${MEDIA_ROOT_DIR}/documents/originals ${MEDIA_ROOT_DIR}/documents/thumbnails; do
|
||||
for dir in "${DATA_DIR}" "${DATA_DIR}/index" "${MEDIA_ROOT_DIR}" "${MEDIA_ROOT_DIR}/documents" "${MEDIA_ROOT_DIR}/documents/originals" "${MEDIA_ROOT_DIR}/documents/thumbnails"; do
|
||||
if [[ ! -d "${dir}" ]]; then
|
||||
echo "Creating directory ${dir}"
|
||||
mkdir "${dir}"
|
||||
|
|
@ -42,7 +42,7 @@ initialize() {
|
|||
set +e
|
||||
echo "Adjusting permissions of paperless files. This may take a while."
|
||||
chown -R paperless:paperless ${tmp_dir}
|
||||
for dir in ${DATA_DIR} ${MEDIA_ROOT_DIR}; do
|
||||
for dir in "${DATA_DIR}" "${MEDIA_ROOT_DIR}"; do
|
||||
find "${dir}" -not \( -user paperless -and -group paperless \) -exec chown paperless:paperless {} +
|
||||
done
|
||||
set -e
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue