Disable an Op Script
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:
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:
From configuration mode in the CLI, enter the following command:
[edit] user@host# deactivate system scripts op file filename
Commit the configuration:
user@host# commit
The filename of the deactivated script remains in the configuration,
but it is flagged with inactive. For example:
[edit system scripts op] user@host# show inactive: file script1.xsl; file script2.xsl; file script3.xsl;
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.