Applications
Configure scripts to run manually
LR54 User Guide
766
For example:
To upload a script from a remote host with an IP address of 192.168.4.1 to the
/etc/config/scripts directory on the LR54 device, issue the following command:
> scp host 192.168.4.1 user admin remote /home/admin/bin/test.py local
/etc/config/scripts/ to local
[email protected]'s password: adminpwd
test.py
100%
36MB
11.1MB/s
00:03
>
c. Type
exit
to exit the Admin CLI.
Depending on your device configuration, you may be presented with an
Access selection
menu
. Type
quit
to disconnect from the device.
Note
You can also create scripts by using the
vi
command when logged in with shell access.
2. Select a device in Remote Manager that is configured to allow shell access to the admin user,
and click
Actions
>
Open Console
. Alternatively, log into the LR54 local command line as a
user with shell access.
Depending on your device configuration, you may be presented with an
Access selection
menu
. Type
shell
to access the device shell.
3. Use the
python
command to run the Python application. In the following example, the Python
application,
test.py
, takes 3 parameters:
120
,
ports
and
storage
:
# python /etc/config/scripts/test.py 120 ports storage
Configure scripts to run manually
You can configure an scripts to be manually run.
Required configuration items
n
Upload or create the script.
n
Enable the script.
n
Set the script to run manually.
Additional configuration items
n
A label used to identify the script.
n
The arguments for the script.
n
Whether to write the script output and errors to the system log.
n
The memory available to be used by the script.
n
Whether the script should run one time only.
Task one: Upload the application
Web
Содержание TransPort LR54
Страница 1: ...LR54 User Guide Firmware version 22 8 ...
Страница 506: ...Virtual Private Networks VPN OpenVPN LR54 User Guide 506 5 Click Apply to save the configuration and apply the change ...
Страница 628: ...Services Simple Network Management Protocol SNMP LR54 User Guide 628 The SNMP page is displayed 4 Click Download ...
Страница 1050: ...Command line interface Execute a command from the web interface LR54 User Guide 1050 The Admin CLI prompt appears ...
Страница 1095: ...Command line interface Command line reference LR54 User Guide 1095 reboot Reboot the system Parameters None ...