Manually Executing A Trigger; Adding Trigger Scripts - Toshiba SG20 - Magnia - Web Server Customization Manual

General customization guide
Hide thumbs Also See for SG20 - Magnia - Web Server:
Table of Contents

Advertisement

Customization
However, assume that every action script could be fired by a trigger without any data and
should be designed so that it regenerates all of its configuration files and restarts all
services that use those files. Be very careful not to fire recursive events. Also, determine
whether the service is enabled (most likely through consulting the centralized
configuration file through SA:Config) and whether you need to fire given the change that
was made. If the vpn only needs to reload, or if the external interface was changed and
doesn't need to fire, or if the internal interface is changed, you must act accordingly to
keep the execution time of a trigger to a minimum.

Manually executing a trigger

A trigger can be executed directly by executing the trigger command from a shell
command line. This method can be useful when you have modified a configuration file
template and want to execute the trigger that processes the template, regenerates the
configuration file, and restarts any associated services. Invoke a trigger using the syntax
"trigger <trigger name>". For example:
trigger mod_samba
Or
trigger network/mod_dialin
Some triggers restart networking services, which can disconnect your Telnet session.

Adding trigger scripts

You can add your own trigger to perform an application-specific action as a result of a
triggering condition. For example, if your application needs to know when the public port
IP address has changed, you could add a script in the network/mod_ip trigger directory.
Your script, along with any other triggers in this directory, is executed when the system
public IP address is changed.
27
Triggers

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents