Add wiki-farm update script
This commit is contained in:
parent
df2c5ec021
commit
5c552736bb
@ -77,3 +77,8 @@
|
||||
enabled: yes
|
||||
state: restarted
|
||||
when: php_config.changed
|
||||
|
||||
- name: Deploy wiki-farm update maintenance script
|
||||
template:
|
||||
src: wiki_update.sh.j2
|
||||
dest: "/home/{{ ansible_user }}/.local/bin/wiki_update.sh"
|
||||
|
@ -3,6 +3,10 @@ if ( !defined( 'MEDIAWIKI' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( !isset( $_SERVER['REQUEST_URI'] ) ) {
|
||||
$_SERVER['REQUEST_URI'] = $argv;
|
||||
}
|
||||
|
||||
$callingurl = strtolower( $_SERVER['REQUEST_URI'] ); // get the calling url
|
||||
if ( strpos( $callingurl, '/{{ wiki_names[0] }}' ) === 0 ) {
|
||||
require_once 'LocalSettings_{{ wiki_names[0] }}.php';
|
||||
|
9
roles/services/wiki/templates/wiki_update.sh.j2
Normal file
9
roles/services/wiki/templates/wiki_update.sh.j2
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd /usr/share/webapps/mediawiki
|
||||
|
||||
maintenance/update.php "/{{ wiki_names[0] }}"
|
||||
|
||||
{%- for extra_wiki in wiki_names[1:] %}
|
||||
maintenance/update.php "/{{ extra_wiki }}"
|
||||
{% endfor %}
|
Reference in New Issue
Block a user