Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
Automation Scripting User Guide
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Disable an Op Script

date_range 14-Jul-21

You can disable an op script by deleting or deactivating the file filename statement at the [edit system scripts op] hierarchy in the configuration. To determine which op scripts are active on the device, issue the show configuration system scripts op operational mode command. The command output lists the enabled op scripts.

To delete an op script from the configuration:

  1. From configuration mode in the CLI, enter the following command:
    content_copy zoom_out_map
    [edit]
    user@host# delete system scripts op file filename
    
  2. Commit the configuration.
    content_copy zoom_out_map
    user@host# commit
    

The file statement is removed from the configuration for the specified op script, and the op operational mode command no longer lists the op script filename as a valid completion.

To deactivate an op script in the configuration:

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

    content_copy zoom_out_map
    [edit]
    user@host# deactivate system scripts op file filename
    
  2. Commit the configuration:

    content_copy zoom_out_map
    user@host# commit
    

The filename of the deactivated script remains in the configuration, but it is flagged with inactive. For example:

content_copy zoom_out_map
[edit system scripts op]
user@host# show

inactive: file script1.xsl;
file script2.xsl;
file script3.xsl;
Note:

You can reactivate an op script using the activate system scripts op file filename command.

Alternatively, you can delete the script from the /var/db/scripts/op directory on a device’s hard disk or from the /config/scripts/op directory on the flash drive. Only users in the Junos OS super-user login class can access and edit files in these directories.

If you delete a script, you should also remove the file statement at the [edit system scripts op] hierarchy level in the configuration. If you delete an op script, but the file statement remains in the configuration, the CLI lists this script as a valid completion for the op command, but Junos OS issues an invalid filename error when the script is executed.

If you deactivate or delete the file statement for an op script in the configuration, you must enable the script again in order to execute it.

footer-navigation