Help:Extension/ScriptFunctions

From Metabolomics.JP
(Difference between revisions)
Jump to: navigation, search
Line 11: Line 11:
  
 
luaが無限ループに陥った場合などの対処として、script_monitoring.shをcrondで実行し、10秒以上実行されているluaプログラムを停止(kill)します。
 
luaが無限ループに陥った場合などの対処として、script_monitoring.shをcrondで実行し、10秒以上実行されているluaプログラムを停止(kill)します。
 +
 +
またセキュリティのため、io、debug、package、osには実行時にnilが代入されます。
  
 
== Requirements ==
 
== Requirements ==

Revision as of 14:27, 19 September 2008

Extension Information
Implementation
Description
Author(s)K, Suwa
Version0.1
MediaWiki1.11.1
License
Hooks used
Token type

Contents


外部スクリプトを使えるようにするextensionです。 現在使えるのはluaのみです。

luaが無限ループに陥った場合などの対処として、script_monitoring.shをcrondで実行し、10秒以上実行されているluaプログラムを停止(kill)します。

またセキュリティのため、io、debug、package、osには実行時にnilが代入されます。

Requirements

lua

Download

versionsourcesize
0.1(September 11,2008)ScriptFunctions.phps


versionsourcesize
0.1(September 11,2008)script_monitoring.sh

Installtion

  1. Download source and rename to ScriptFunctions.php and script_monitoring.sh.
  2. Put in extensions/ directory.
  3. 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プログラムを一時的に保存する場所です。
  4. Put in any direcotry.( ideal: /etc/cron.d/ )
  5. Insert follow line to /etc/crontab
    * * * * * root /etc/cron.d/lua_monitoring.sh

Function

  1. lua
Personal tools
Namespaces

Variants
Actions
Navigation
metabolites
Toolbox