You can store a master copy of each op script in a central repository. This eases file management because you can make changes to the master op script in one place and then refresh the local copies of the currently enabled event scripts.
To indicate the location of the master source file of an op script, include the source statement at the [edit system scripts op file filename] hierarchy level:
- [edit system scripts op file filename]
-
source url;
Specify the source as a Hypertext Transfer Protocol (HTTP) URL, FTP URL, or secure copy (scp)-style remote file specification. The following example uses an HTTP URL:
- [edit]
- system {
-
- scripts {
-
- op {
-
- file iso {
- source http://my.example.com/pub/scripts/iso.xsl;
- }
- }
- }
- }
For each routing platform, the local source of the op script remains the /var/db/scripts/op directory on the routing platform. The source statement allows you to refresh the copy located in the /var/db/scripts/op directory by overwriting it with the master copy located at the specified URL.
The source statement has no effect until you include the refresh statement in the configuration, as described in Refreshing an Op Script from the Master Source.