Skip to content

Commit

Permalink
Install LocalisationUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
lens0021 committed Mar 3, 2019
1 parent c608bee commit cc95e24
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ RUN crontab /tmp/crontab && rm /tmp/crontab
RUN sudo -u www-data mkdir -p /srv/femiwiki.com/sitemap
COPY cron/generate-sitemap /usr/local/bin/generate-sitemap

# Install 'localisation-update' script
COPY cron/localisation-update /usr/local/bin/localisation-update

# Store femiwiki resources
COPY --chown=www-data:www-data resources /srv/femiwiki.com/
Expand Down
3 changes: 3 additions & 0 deletions configs/LocalSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,9 @@
# PageImages
wfLoadExtension( 'PageImages' );

# LocalisationUpdate
wfLoadExtension( 'LocalisationUpdate' );

# FacetedCategory
wfLoadExtension( 'FacetedCategory' );

Expand Down
1 change: 1 addition & 0 deletions cron/crontab
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
0 1,5,9,13,17,21 * * * /usr/local/bin/generate-sitemap
0 5 * * * /usr/local/bin/localisation-update
13 changes: 13 additions & 0 deletions cron/localisation-update
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# 주기적으로 실행해야하는 스크립트. 미디어위키의 시스템 메시지를 항상 최신으로
# 유지시켜 준다.
#
# Reference:
# https://www.mediawiki.org/wiki/Extension:LocalisationUpdate

set -euo pipefail; IFS=$'\n\t'

cd /srv/femiwiki.com/extensions/LocalisationUpdate

sudo -u www-data php update.php --quiet
1 change: 1 addition & 0 deletions extension-installer/install_extensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
'Widgets',
'UniversalLanguageSelector',
'Translate',
'LocalisationUpdate',
]
# 3rd party extensions and their URLs
extensions_3rdparty = {
Expand Down
2 changes: 2 additions & 0 deletions run
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ fi

# Run update script
/srv/femiwiki.com/maintenance/update.php --quick
# Update localisations for MediaWiki messages in the background
php /srv/femiwiki.com/extensions/LocalisationUpdate/update.php &

# Start cron daemon
cron
Expand Down

0 comments on commit cc95e24

Please sign in to comment.