Help:Extension/ScriptFunctions

From Metabolomics.JP
(Difference between revisions)
Jump to: navigation, search
Line 32: Line 32:
 
  <li>Put in extensions/ directory.</li>
 
  <li>Put in extensions/ directory.</li>
 
  <li>Insert follow line to LocalSettings.php
 
  <li>Insert follow line to LocalSettings.php
  <pre>require_once( "$IP/ScritFunctions.php" );
+
  <pre>require_once( "$IP/extensions/ScritFunctions.php" );
$ugLuaPath = "path to directory which in lua binary";
+
$egLuaPath = "path to directory which in lua binary";
$ugTmpPath = "path to tmp directory"; ( default: "/tmp" )</pre>
+
$egTmpPath = "path to tmp directory"; ( default: "/tmp" )</pre>
$ugLuaPathを定義しなかった場合、プログラムは実行されません。<br>
+
$egLuaPathを定義しなかった場合、プログラムは実行されません。<br>
$ugTmpPathはluaプログラムを一時的に保存する場所です。</li>
+
$egTmpPathはluaプログラムを一時的に保存する場所です。</li>
 
  <li>Put in any direcotry.( ideal: /etc/cron.d/ )</li>
 
  <li>Put in any direcotry.( ideal: /etc/cron.d/ )</li>
 
  <li>Insert follow line to /etc/crontab
 
  <li>Insert follow line to /etc/crontab

Revision as of 11:35, 18 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)します。

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