0

Command-Line Scripts

  • updated 7 mths ago

Use the command-line scripts detailed in this topic when installing/setting up LogicNets.

Create a New Company

System administrators can create a new company in an existing LogicNets installation using the following steps.

  1. Open a system command prompt.
  2. Type cd <LogicNetsInstallation>/system/scripts.
  3. Type addcompany <company-name>.
    • The company name should only contain alphanumeric characters.
    • On some operating systems the folder names are case-sensitive and will reflect in the browser URL.
  4. Go to the components folder in the unzipped LogicNets installation package and run install_components.
    • This step installs and registers all licensed LogicNets components in the installed local companies.
  5. Open an internet browser.
  6. Enter the following URL: http://<yourdomain>/<company/logicnets.lns?verb=start&code=logon.
  7. Verify that the logon page displays.

Create an Admin User

By default, a new company does have any users configured, and a system administrator must use the command line to create the first user. Authorized admin users can create subsequent users with the browser-based Access Management tool in the LogicNets system.

A system administrator creates the first admin user in an existing LogicNets installation using the following steps.

  1. Open a system command prompt.
  2. Type cd <LogicNetsInstallation>/system/scripts.
  3. Type adduser.
  4. Fill in all user details.
  5. Go to the components folder in the unzipped LogicNets installation package and run assign_default_components.
    • By default, no default applications and tools are assigned to the admin user.
    • This step assigns all default components to all admins in all local companies.
  6. Open an internet browser.
  7. Enter the following URL: http://<yourdomain>/<company/logicnets.lns?verb=start&code=logon.
  8. Verify that the logon page displays.
  9. Log in with the credentials assigned to the first user.
  10. Verify that the admin user can access all default system components.

Install a Published Package

System Administrators can install a published package in a different LogicNets installation using the following steps.

  1. Publish a project and download the zip file to the server (e.g. c:\mypackage.zip).
  2. Open the command prompt and go to c:\LogicNets\system\scripts.
  3. Start the install package script (<company> <package-zip-full-path> <start-code>).
    •  install_package mycompany C:\mypackage.zip myapp.
  4. Start the package.

Notes

  • If you re-install a package with the same name, it overwrites the previous package.
  • By default, the system sets to inactive the status of those already installed packages that have the same category as the one you are installing. The category is the project name in the Designer. You can disable this functionality by providing an additional command line parameter ‑keepexistingactive.
  • If a meta-xml file is located next to the package zip file (C:\mypackage.zip) with the same name as the package zip file added with “.xml” (C:\mypackage.zip.xml), the system also installs the meta-xml file.
  • If the installation fails the system sets a non-zero exit code.

Uninstall a Published Package

System Administrators can uninstall a previously installed package using the following steps.

  1. Open the command prompt and go to c:\LogicNets\system\scripts.
  2. Start the uninstall package script (<company> <package-name>).
    • uninstall_package mycompany mypackage.

Logging

In some cases, a LogicNets service engineer can request a log file to help debug a reported problem. However, by default, logging is disabled on a production system. Retrieving log files differs on Windows and Linux-systems, and the steps below will help you enable and view logging.

Enabling Logging

To enable debug logging use the following steps.

  1. Open the LogicNets configuration file in a text editor.
    • c:/logicnets/system/lib/sys/settings.cfg
  2. Search for the setting called LNLOG_PROFILE_DEFAULT.
  3. Change the value to DEBUG.
  4. Save the configuration file.

The updated configuration will be active for all LogicNets sessions started after the update. The change will not affect existing sessions.

View Logging on a Windows Machine

The logging on a Windows machine is not saved in log files, but you can access files using an external tool by using the following steps.

  1. Download and install DebugView from SysInternals - https://technet.microsoft.com/en-us/sysinternals/debugview.aspx.
  2. Start the DebugView application in administrator mode.
  3. To ensure that Global Win32 events are logged, click the following
    • Capture-Menu.
    • Capture Global Win32
  4. Use the LogicNets application.
  5. Save the log to a file.
  6. Send the log.file to LogicNets.

View Logging on a Linux Machine

The logging on a Linux machine is saved in log files, and this logging is saved in three different files:

/etc/httpd/logs/error_log
/tmp/lua.log
/tmp/logicnets.log

To help with troubleshooting, please send all three files to LogicNets.

Note: RHEL Apache can make use of the "private-tmp" feature. Depending on your RHEL setup the log files may be located somewhere else. Typical locations include the following:

  •  /tmp/systemd-private-XXXXXXXXXXX-httpd.service-XXXXX/tmp
  • /var/tmp/systemd-private-XXXXXXXXXXX-httpd.service-XXXXX/tmp

Settings

To make changes to the LogicNets configuration you must create or adapt a company settings file. To do this, create a new file called settings.cfg in the following folder: c:/logicnets/dat/bnt/<company-name>.

Add References

To configure the reference source, follow these steps:

  • Edit the configuration file, adding the following basic structure:
_session = {
reference_sources = {
}
  •  For each source, add the following structure inside the section called reference_sources = { <INSERT> }
{
name = "NAME",
caption = "CAPTION",
browser_uri = "BROWSER_URI",
show_uri = "SHOW_URI",
icon = "ICON_LINK"
},

The following is a full example of a company settings.cfg file.

_session = {
reference_sources = {
{
name = "external_topic",
caption = "External Topic",
browser_uri = "http://topics/InsertTopicLink.aspx?ContentId=$(project_id)&external_id=$(external_session_id)&requestUrl=$(redirect_url)",
show_uri = "http://topics/opentopic.aspx?topicId=$(topicId)&bookmarkId=$(bookmarkId)&view=web",
icon = "/lncore/icons/fileupload.png"
},
{
name = "external_graphic",
caption = "External Graphic",
browser_uri = "http://topics/InsertGraphicLink.aspx?ContentId=$(project_id)&external_id=$(external_session_id)&requestUrl=$(redirect_url)",
show_uri = "http://topics/graphicpreview.aspx?graphicId=$(graphicIdId)",
icon = "/lncore/icons/fileupload.png"
}
}
}

SMTP

You can configure LogicNets applications to send emails. To use this feature, you must configure the SMTP server using the following setup.

_global = {
SMTP_SERVER = "localhost",
SMTP_FROM_ADDRESS = "noreply@logicnets.com",
SMTP_PORT = 25,
}

 

Reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
Like Follow
  • 2 yrs agoLast active
  • 136Views
  • 3 Following

Home