Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

request system scripts refresh-from

Syntax

Description

Refresh a local script from a remote source at the specified URL. The system uses the script type to determine the directory on the device where the script resides. If you include the sync option, the system refreshes the script on the requesting Routing Engine and then synchronizes the script on the other Routing Engine. If the load-scripts-from-flash statement is present in the configuration for that Routing Engine, the system refreshes the script in flash memory. Otherwise, the system refreshes the script on the hard disk.

If you specify an HTTPS URL, you must also include the cert-file option in supported releases. The cert-file option specifies the path to the certificate (Root CA or self-signed) that the device uses to validate the server's certificate.

Note:

We do not recommend refreshing scripts from an HTTPS server when the device is unable to authenticate the server because malicious users could compromise the integrity of a script.

The Junos XML management protocol equivalent for this operational mode command is:

Options

(commit | event | extension-service | op | snmp)

Specify in which scripts subdirectory the script resides: commit, event, jet, op, or snmp.

cert-file path

Absolute path to the certificate (Root CA or self-signed) in Privacy-Enhanced Mail (PEM) format that is used to validate the server's certificate when you specify an HTTPS URL.

file filename

Filename of the script to refresh.

routing-instance routing-instance-name

(Optional) Name of the routing instance through which you want to refresh the script.

sync

(Optional) Synchronize the refreshed script from the requesting Routing Engine to the other Routing Engine.

url url

URL of the file that will replace the script provided as an HTTPS URL, HTTP URL, FTP URL, or secure copy (scp)-style remote file specification.

Required Privilege Level

maintenance

Sample Output

request system scripts refresh-from

The following command refreshes the op script config.slax from the remote source at the specified URL.

request system scripts refresh-from

The following command refreshes the op script config1.slax from the remote source at the specified URL. However, in this case, the script does not exist at the remote site, and the device generates an error message.

request system scripts refresh-from sync

The following command refreshes the op script config.slax on the requesting Routing Engine from the remote source at the specified URL. The system then synchronizes the updated script to the other Routing Engine.

request system scripts refresh-from cert-file

The following command refreshes the op script ospf-neighbors.slax from the remote source at the HTTPS URL. The command includes the cert-file option, which references the Root CA certificate file required to validate the server's certificate.

Release Information

Command introduced in Junos OS Release 10.1.

sync option introduced in Junos OS Release 13.2.

extension-service and routing-instance options introduced in Junos OS Release 18.1R1.

cert-file option introduced in Junos OS Release 21.2R1.