Trigger event handling and activation
TRIGGER EVENT HANDLING AND ACTIVATION
TRIGGERS OR COMMANDS ACTIVATED AFTER AN EVENT
After a specific event it is possible to activate triggers or system commands.
Generally, the execution of a trigger is linked to the activation or deactivation of an interface or
when a certain related event occurs.
Triggers can be activated when the events are linked to the operational status of a network
interface:
ADSL
eth0
eth1
GPRS
GRE
ISDN
PPTP
L2TP
It is also possible to activate triggers after the activation of the following services:
NTP
VRRP
Backup
Timer-tick
GPRS-tc
DHCP client
OpenVPN
IPSec
For example, the ADSL interface can be activated any time after the start-up of Imola: if the user
wants to activate the bgp service when this interface is activated, a trigger must be configured in
the following way:
set trigger adsl up set bgp on
In the same way, if at the moment of deactivation of ADSL interface the user also wants to
deactivate the bgp service, the following trigger must be configured:
set trigger adsl down set bgp off
In the same way, when the GPRS interface is activated, it could be necessary to change the static
routes:
set trigger gprs up ip route del 4.4.4.0/24 dev eth0
set trigger gprs up ip route add 4.4.4.0/24 dev ppp0
and vice versa at the following deactivation:
set trigger gprs up ip route del 4.4.4.0/24 dev ppp0