Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that various directories are writeable #413

Merged
merged 4 commits into from
Jul 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions _sources/scripts/run-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ check_mount_points
sleep 1
cd "$MW_HOME" || exit

# Check and update permissions of wiki images in background.
# It can take a long time and should not block Apache from starting.
/update-images-permissions.sh &

########## Run maintenance scripts ##########
echo "Checking for LocalSettings..."
if [ -e "$MW_VOLUME/config/LocalSettings.php" ] || [ -e "$MW_VOLUME/config/CommonSettings.php" ]; then
Expand All @@ -103,6 +107,9 @@ else
chmod -R g=rwX $MW_VOLUME/sitemap
fi

echo "Checking permissions of MediaWiki volume dir $MW_VOLUME except $MW_VOLUME/images..."
make_dir_writable "$MW_VOLUME" -not '(' -path "$MW_VOLUME/images" -prune ')'

# Running php-fpm
/run-php-fpm.sh &

Expand Down
11 changes: 11 additions & 0 deletions _sources/scripts/update-images-permissions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

sleep 0.01
printf "\n\n===== update-images-permissions.sh =====\n\n\n"

set -x

. /functions.sh

echo "Checking permissions of images in MediaWiki volume dir $MW_VOLUME/images..."
make_dir_writable "$MW_VOLUME/images"
Loading