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です。
現在使えるのはluaのみです。
luaが無限ループに陥った場合などの対処として、script_monitoring.shをcrondで実行し、10秒以上実行されているluaプログラムを停止(kill)します。
Requirements
Download
version | source | size |
0.1(September 11,2008) | ScriptFunctions.phps |
version | source | size |
0.1(September 11,2008) | script_monitoring.sh |
Installtion
- Download source and rename to ScriptFunctions.php and script_monitoring.sh.
- Put in extensions/ directory.
- Insert follow line 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を定義しなかった場合、プログラムは実行されません。
$egTmpPathはluaプログラムを一時的に保存する場所です。
- Put in any direcotry.( ideal: /etc/cron.d/ )
- Insert follow line to /etc/crontab
* * * * * root /etc/cron.d/lua_monitoring.sh