beautypg.com

Disabling commit scripts – Juniper Networks J-Series User Manual

Page 113

background image

Table 43: Enabling Commit Scripts

CLI Configuration Editor

J-Web Configuration Editor

Task

From the

[edit]

hierarchy level, enter

edit system scripts commit

1.

In the J-Web interface, select
Configuration>View and Edit>Edit
Configuration
.

2.

Next to System, click Configure or
Edit.

3.

Next to Scripts, click Configure or
Edit.

4.

Next to Commit, click Configure or
Edit.

Navigate to the Commit level in the
configuration hierarchy.

Set the script file name:

set file commit-script.xsl

1.

Next to File, click Add new entry.

2.

In the File name box, type

commit-script.xsl

.

3.

Click OK.

Enable the commit script file—for
example,

commit-script.xsl

.

Disabling Commit Scripts

If you do not want a commit script to run, you can disable it by deleting or
deactivating it in the configuration. Deleting a commit script permanently removes
it from the configuration. To run the script later, you must reenable the script as
described in “Enabling Commit Scripts” on page 90. Deactivating a commit script
disables the script until you activate it later.

To delete a commit script:

1.

From configuration mode in the CLI, enter the following command:

user@host# delete system scripts commit filename.xsl

2.

Commit the configuration:

user@host# commit

commit complete

To deactivate a commit script:

1.

From configuration mode in the CLI, enter the following command:

user@host# deactivate system scripts commit filename.xsl

2.

Commit the configuration:

user@host# commit

Defining and Enforcing Configuration Rules with Commit Scripts

91

Chapter 6: Automating Network Operations and Troubleshooting