Personal tools
From wiki.swiftlytilting.com
Jump to: navigation, search

MaintenanceShell

MaintenanceShell provides access to the Maintenance scripts via a Special Page.

Maintenance scripts are powerful tools which can have a significant impact on your wiki. Many of them require users to have access to the file system. Do not grant rights to the MaintenanceShell lightly.

Contents

Usage

  1. Chose the script from the list.
  2. Fill in the command line settings as if you were typing the commands via a terminal shell.
  3. Submit the form.

Working directories

The default working directory for the maintenance scripts is yourwikidir/maintenance/ . You may override this value using $wgMaintenanceShellDir.

# Default settings
$wgMaintenanceShellDir = "$IP/maintenance/";

You may also use the magic word {{ROOT}} in the command line area. It will be replaced with the full path to the root folder of the web server.

Default folder of the MaintenanceShell script:
{{ROOT}}/w/extensions/MaintenanceShell/

Downloads

Installation

To install this extension:

  1. Download the installation package.
  2. Unzip and place all files in yourwikidir/extensions/MaintenanceShell/.
  3. Add the following to LocalSettings.php:
# Sysops will have access to the MaintenanceShell
$wgGroupPermissions['sysop']['maintenanceshell'] = true;
 
#Place this on the VERY LAST line of your Localsettings.php file:
require_once("$IP/extensions/MaintenanceShell/MaintenanceShell.php");

Note: The require_once line MUST be the last line of your Localsettings.php to ensure all settings are loaded when the MaintenanceShell is run.

User rights

MaintenanceShell adds a new user right called maintenanceshell, which a user must be granted before they can access the MaintenanceShell page. You may add the right to an existing group, or assign it to a new group and add users to that group. Place the following code in LocalSettings.php:

Existing group:

 $wgGroupPermissions['sysop']['maintenanceshell'] = true;

New user group:

 $wgGroupPermissions['maintainer']['maintenanceshell'] = true;

Change Log

v0.2.4

  • Fixed IE related bug

v0.2.3

  • Moved all strings to the language file to allow for localization
  • Includes German language localization
  • Fixed some minor bugs

v0.2.2

  • Included support for double quote marks ("") which allow for parameters with spaces as well as parameters with null values.
  • Added a few links to relevant info on the maintenance shell page.

v0.2.1

  • Fixed some minor bugs
  • Added message notifying user when MaintenanceShell is incorrectly configured.

v0.2.0

  • Replaced buggy and annoying password system with Mediawiki based authentication
  • Changed look of interface slightly

v0.1.0

  • First public release

Notes

MaintenanceShell tricks maintenance scripts into thinking they are running from the command line instead of a web server. There may be unexpected results due to this fact -- however, all scripts tested so far are working normally. Please report any unexpected results on talk page.

Errors in commandLine.inc

commandLine.inc is provided with your Mediawiki installation. Depending on your error settings you may see some warning and notice messages emited from commandLine.inc when you run scripts using MaintenanceShell. You can edit commandLine.inc in two places to hide these errors.

Line 27

Change

define('MEDIAWIKI',true);

To

@ define('MEDIAWIKI',true);

Line 115

Change

if ( file_exists ....

To

if ( @ file_exists ....

See also

Winbinder Projects