file (JET)
Syntax (Junos OS)
file filename { arguments arguments; cert-file path; checksum hash-algorithm hash-value; daemonize; optional; refresh; refresh-from; respawn-on-normal-exit; routing-instance; source; start { start-options { mem-factor percentage; } } traceoptions { file <filename> <files number> <match regex> <size size> <world-readable | no-world-readable>; flag flag; no-remote-trace; } username username; }
Syntax (Junos OS Evolved)
file filename { arguments arguments; cert-file path; checksum hash-algorithm hash-value; daemonize; interpreter (bash | python | python3); optional; refresh; refresh-from; respawn-on-normal-exit; routing-instance; source; start { start-options { mem-factor percentage; } } traceoptions { file <filename> <files number> <match regex> <size size> <world-readable | no-world-readable>; flag flag; no-remote-trace; } username username; }
Hierarchy Level
[edit system extensions extension-service application]
Description
For files in the [edit system extensions extension-service
application]
hierarchy level, specify the configuration for
each file in the extension-service application.
Options
arguments arguments |
Specify the command-line arguments called by a JET application. A program can take any number of command-line arguments. Enter the arguments in the way the application expects. Developer must supply this information. |
daemonize |
Specify the file as daemonized. An application runs as a daemonized process in the background. An application configured to run as a daemonized process is automatically triggered upon commit. A non-daemonized application must be triggered manually from the command-line client. |
filename |
Local filename of the script file. |
interpreter (bash | python | python3) |
Specify whether a device running Junos OS Evolved should run a daemonized on-device JET application using Bash, Python 2, or Python 3. Note:
Starting in Junos OS Evolved Release 22.3R1, Python 2.7 is no longer
supported. The |
optional |
Allow the operating system to commit the configuration even if the file is not available at the /var/db/scripts/jet file path. |
respawn-on-normal-exit |
Automatically restart a daemonized JET application written in Python
after you exit the application normally, such as when you upgrade the
JET application. If this option is not configured, and if the
application normally exits, it will not restart automatically. This
option can only be used with Python JET applications that have been
configured to run as a daemonized process using the
|
username username |
Specify the name of the user under whose privileges the extension service
will execute. This user name is configured at the
|
The remaining statements are explained separately. See CLI Explorer.
Required Privilege Level
maintenance—To view or add this statement in the configuration.
Release Information
Statement introduced in Junos OS Release 16.1.
refresh
, refresh-from
,
respawn-on-normal-exit
, routing-instance
, and
source
options added in Junos OS Release 18.1R1.
interpreter
option added in Junos OS Evolved Release 20.3R1.
optional
option added in Junos OS and Junos OS Evolved Release 23.2R1.