mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-15 09:51:21 +00:00
mediawiki: Run update script for 1.30 upgrade
This will temporarily fix the issue in #1300 till Debian releases a new version of MediaWiki. We should also implement a mechanism to trigger update.php whenever the MediaWiki package gets updated. Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
4151ab3f10
commit
18912f5373
@ -41,6 +41,7 @@ def parse_arguments():
|
||||
subparsers.add_parser('enable', help='Enable MediaWiki')
|
||||
subparsers.add_parser('disable', help='Disable MediaWiki')
|
||||
subparsers.add_parser('setup', help='Setup MediaWiki')
|
||||
subparsers.add_parser('update', help='Run MediaWiki update script')
|
||||
|
||||
help_pub_reg = 'Enable/Disable/Status public user registration.'
|
||||
pub_reg = subparsers.add_parser('public-registrations', help=help_pub_reg)
|
||||
@ -123,6 +124,12 @@ def subcommand_change_password(arguments):
|
||||
])
|
||||
|
||||
|
||||
def subcommand_update(_):
|
||||
"""Run update.php maintenance script when version upgrades happen."""
|
||||
update_script = os.path.join(MAINTENANCE_SCRIPTS_DIR, 'update.php')
|
||||
subprocess.check_call(['php', update_script])
|
||||
|
||||
|
||||
def subcommand_enable(_):
|
||||
"""Enable web configuration and reload."""
|
||||
action_utils.service_enable('mediawiki-jobrunner')
|
||||
|
||||
@ -26,7 +26,7 @@ from plinth.menu import main_menu
|
||||
|
||||
from .manifest import clients
|
||||
|
||||
version = 1
|
||||
version = 2
|
||||
|
||||
managed_packages = ['mediawiki', 'imagemagick', 'php-sqlite3']
|
||||
|
||||
@ -77,6 +77,7 @@ def setup(helper, old_version=None):
|
||||
"""Install and configure the module."""
|
||||
helper.install(managed_packages)
|
||||
helper.call('setup', actions.superuser_run, 'mediawiki', ['setup'])
|
||||
helper.call('update', actions.superuser_run, 'mediawiki', ['update'])
|
||||
helper.call('enable', actions.superuser_run, 'mediawiki', ['enable'])
|
||||
global service
|
||||
if service is None:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user