Containers
Create a custom container
IX14 User Guide
442
5. Set the mode to interval:
(config system schedule script 0)> when interval
(config system schedule script 0)>
6. Set the interval to ten seconds:
(config system schedule script 0)> on_interval 10s
(config system schedule script 0)>
7. Set the commands that will execute the script:
(config system schedule script 0)> commands "lxc
script_name
/bin/ping -c
1
IP_address
"
(config system schedule script 0)>
For example:
(config system schedule script 0)> commands "lxc test_lxc /bin/ping -c 1
192.168.1.146"
(config system schedule script 0)>
8. Disable the
sandbox
. Sandbox restrictions are not necessary when a container is used.
(config system schedule script 0)> sandbox false
(config system schedule script 0)>
9. Save the configuration and apply the change:
(config)> save
Configuration saved.
>
10. 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.
Create a custom container
This example creates a simple custom container that contains a python script in the /etc directory.
In this example, we will use a simple container file named test_lxc.tgz. You can download
from the Digi website.
At the command line of a Linux host, we will unpack the file, add a simple python script, and create a
new container file that includes the python script.
Create the custom container file
1. At the command line of a Linux host, unpack the test_lxc.tgz file:
$ tar -xfv test_lxc.tgz
rootfs/
Содержание IX14
Страница 1: ...IX14 User Guide Firmware version 22 2 ...
Страница 45: ...Configuration and management Exit the command line interface IX14 User Guide 45 Type q or quit to exit ...
Страница 515: ...Monitoring This chapter contains the following topics intelliFlow 516 Configure NetFlow Probe 523 IX14 User Guide 515 ...
Страница 756: ...Routing Virtual Router Redundancy Protocol VRRP IX14 User Guide 756 ...
Страница 803: ...Command line interface Command line reference IX14 User Guide 803 Parameters None ...
Страница 812: ...Command line interface Command line reference IX14 User Guide 812 reboot Reboot the system Parameters None ...