57.2. LUA SCRIPT management

LUA SCRIPT management can be done from the command line or from the web page.

57.2.1. LUA SCRIPT management through CP

LUA scripts are manageable both via web interface or via CP. The best choice is to use the web interface, but if you have to manage Abilis remotely via Telnet or SSH you need to know how to use the CP.

One of the first steps is to create the LUA script, locally on the PC and then load it into the abilis.

There are three ways to upload a LUA script:

Example of uploading of Lua script file using ZMODEM:

[15:13:52] ABILIS_CPX:file put z C:\APP\SCRIPT\restartdsl.lua

READY TO RECEIVE FILE...

Starting zmodem transfer.  Press Ctrl+C to cancel.
Transferring restartdsl.lua...
  100%       4 KB       4 KB/sec    00:00:01       0 Errors  


FILE TRANSFER ENDED, PRESS <ENTER> TO CONTINUE...

FILE TRANSFER SUCCESSFULLY COMPLETED

RECEIVED FILE 'C:\APP\SCRIPT\restartdsl.lua' FORMAT IS UNKNOWN.
NO CHECK DONE.

The next step is to start the Lua script.

[15:16:21] ABILIS_CPX:script start file:restartdsl.lua

COMMAND EXECUTED 

To see if the script is running correctly, use the following command:

[15:19:15] ABILIS_CPX:script output file:restartdsl.lua

Lua 5.3.4  Copyright (C) 1994-2017 Lua.org, PUC-Rio

       STATE:DOWN            LINK-STATE:LINKDOWN       
State of ip-25  is DOWN            

To stop the script use:

[15:27:50] ABILIS_CPX:script stop file:restartdsl.lua 

COMMAND EXECUTED 

To run the script when abilis starts, use this command:

[15:31:16] ABILIS_CPX:s p script id:0 startup:yes file:restartdsl.lua

COMMAND EXECUTED

[15:31:39] ABILIS_CPX:d p script

RES:Script - Not Saved (SAVE CONF), Not Refreshed (INIT) ----------------------
       ------------------------------------------------------------------------
Run    DESCR:Lua_scripting_service
       LOG:DS        ACT:YES    bg-sesnum:5    tcp-sockets:0   udp-sockets:0
       wdir:C:\APP\SCRIPT\
       - Background scripts ---------------------------------------------------
       id:0  startup:YES  file:restartdsl.lua
       id:1  startup:NO   file:
       id:2  startup:NO   file:
       id:3  startup:NO   file:
       id:4  startup:NO   file:

57.2.2. LUA SCRIPT management via WEB

To manage LUA scripts through the web interface, see Section 72.23, “LUA scripts”.