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

Add missing imports and remove unused parameter #434

Merged
merged 2 commits into from
Sep 2, 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
4 changes: 2 additions & 2 deletions _sources/scripts/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ get_mediawiki_db_var() {
echo "Unexpected variable name passed to the get_mediawiki_db_var() function: $1"
return
esac
VALUE=$(php /getMediawikiSettings.php --variable=wgDBservers --variableArrayIndex="[0,\"$I\"]" --format=string)
VALUE=$(php /getMediawikiSettings.php --variable=wgDBservers --format=string)
if [ -z "$VALUE" ]; then
VALUE=$(get_mediawiki_variable "$1")
fi
Expand All @@ -50,7 +50,7 @@ get_hostname_with_port() {
get_mediawiki_cirrus_search_server() {
server=$(get_mediawiki_variable wgCirrusSearchServers first)
if [ -z "$server" ]; then
server=$(php /getMediawikiSettings.php --variable=wgCirrusSearchClusters --variableArrayIndex="[\"default\",0]" --format=string)
server=$(php /getMediawikiSettings.php --variable=wgCirrusSearchClusters --format=string)
fi
get_hostname_with_port "$server" 9200
}
Expand Down
1 change: 1 addition & 0 deletions _sources/scripts/run-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ cd "$MW_HOME" || exit
echo "Checking for LocalSettings..."
if [ -e "$MW_VOLUME/config/LocalSettings.php" ] || [ -e "$MW_VOLUME/config/CommonSettings.php" ]; then
# Run auto-update
. /run-maintenance-scripts.sh
run_autoupdate
if [ -e "$MW_VOLUME/config/wikis.yaml" ]; then
config_subdir_wikis
Expand Down
4 changes: 4 additions & 0 deletions _sources/scripts/update-docker-gateway.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ set -x

. /functions.sh

get_docker_gateway () {
getent hosts "gateway.docker.internal" | awk '{ print $1 }'
}

# Try to fetch gateway IP from extra host
DOCKER_GATEWAY=$(get_docker_gateway)

Expand Down
Loading