Help:Extension/ScriptFunctions

From Metabolomics.JP
Revision as of 15:41, 30 August 2010 by Editor (Talk | contribs)

Jump to: navigation, search
Extension Information
Implementation
Description
Author(s)K, Suwa
Version0.2
MediaWiki1.11.1
License
Hooks used
Token type

Contents


Extension to use an external scripting language, Lua.

Since an infinite loop can be achieved by Lua, script_monitoring.sh run by crond will kill all Lua processes running longer than 10 seconds.

For security, Lua's io, debug, package, os library are nullified. Also, the program halts when it finds 'dofile'.

Requirements

Download

versionsourcemd5
0.2(July 31,2010)ScriptFunctions.phps
06836d5073909109d6cbc5dc976d8456
0.1(October 7,2008)ScriptFunctions-0.1.phps
394b55519d7449f06cbf34b4ed845570


versionsourcemd5
0.1(September 30,2008)script_monitoring.sh
eedd37d4618802a48fd5b26d8dbfedfb

Installtion

  1. Download the source code and rename it to ScriptFunctions.php and script_monitoring.sh.
  2. Place it in the extensions/ directory.
  3. Insert the follow lines to LocalSettings.php
    require_once( "$IP/extensions/ScriptFunctions.php" );
    $egLuaPath = "path to directory which in lua binary";
    $egTmpPath = "path to tmp directory"; ( default: "/tmp" )

    $egLuaPath is required.

    $egTmpPath is a temporary place to save Lua programs.
  4. Put in any direcotry.( ideal: /etc/cron.d/ )
  5. Insert follow line to /etc/crontab
    * * * * * root /etc/cron.d/script_monitoring.sh

Function

  1. lua
Personal tools
Namespaces

Variants
Actions
Navigation
metabolites
Toolbox