file (JET)
Syntax
file filename {
arguments arguments;
checksum hash-algorithm hash-value;
daemonize;
interpreter (bash | python | python3);
respawn-on-normal-exit;
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]
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.
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,
or Python 3.
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 daemonize option.
username username—Specify the name of the user under whose
privileges the extension service will execute. This user name is configured
at the [edit system login] hierarchy level. If you do
not associate a user name with an extension-service application, the
application is executed as user nobody.
Default: nobody
The remaining statements are explained separately. See CLI Explorer.
Required Privilege Level
maintenance—To view this statement in the configuration.
maintenance-control—To add this statement to the configuration.