Enabling an Event Script
Event scripts are stored on a router or switch’s hard
drive (in the /var/db/scripts/event directory) or flash drive (in the /config/scripts/event directory). Only users in the JUNOS superuser login class can access
and edit files in these directories. For information about setting
the storage location for scripts, see Storing Event Scripts in Flash Memory.
![]() |
Note:
If the router or switch has dual Routing Engines and you
want to enable an event script to execute on both Routing Engines,
you must copy the script to the |
You must enable event op script before it can be executed. Include the file filename statement at the [edit event-options events-script] hierarchy level, specifying the name of an Extensible Stylesheet Language Transformations (XSLT) or Stylesheet Language Alternative Syntax (SLAX) file containing an event script. Only users who belong to the JUNOS super-user login class can enable event scripts.
- [edit event-options event-script]
- file filename;
The filename of an event script written in SLAX must include the .slax extension for the script to be enabled and executed. No particular filename extension is required for event scripts written in XSLT, but we strongly recommend that you append the .xsl extension.
To determine which event scripts are currently active on the
router, either list the contents of the /var/run/scripts/event directory or use the show command to display the files
included at the [edit event-options event-script] hierarchy
level.


