Help:Extension/ScriptFunctions
From Metabolomics.JP
Extension Information | |
Implementation | |
Description | |
Author(s) | K, Suwa |
Version | 0.1 |
MediaWiki | 1.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
version | source | md5 |
0.1(September 11,2008) | ScriptFunctions.phps |
version | source | md5 |
0.1(September 11,2008) | script_monitoring.sh |
Installtion
- Download the source code and rename it to ScriptFunctions.php and script_monitoring.sh.
- Place it in the extensions/ directory.
- Insert the follow lines to LocalSettings.php
require_once( "$IP/extensions/ScritFunctions.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.
- Put in any direcotry.( ideal: /etc/cron.d/ )
- Insert follow line to /etc/crontab
* * * * * root /etc/cron.d/script_monitoring.sh