Services and applications Python
Digi TransPort WR Routers User Guide
154
Additional configuration items
n The arguments for the Python script.
n The action to take if the Python script finishes. The actions that can be taken are
l None.
l Restart the script.
l Reboot the TransPort device.
Web
1. On the menu, click System > Configuration > Python Autostart.
2. Click (Add Rule) .
n Enabled: Enables or disables the autostart rule.
n Filepath: Type or select the path and filename of the Python script to be included in the
autostart rule.
n Args: (Optional) Include arguments for the selected Python script.
n On exit: Select the action to be taken when the script finishes. Allowed values are:
none, restart or reboot.
3. Click Apply.
Command line
Use the python-autostart command to configure Python applications to be automatically run at
startup.
1. Configure the Python application to be run automatically at startup.
digi.router> python-autostart 1 filepath “scripts/traffic.py”
2. (Optional) Configure arguments for the Python script.
digi.router> python-autostart 1 args “300 –quiet”
3. (Optional) Configure the action to be taken when the script finishes. Allowed values are: none,
restart or reboot.
digi.router> python-autostart 1 restart
4. Enable the Python script.
digi.router> python-autostart 1 state on
5. Save the configuration.
digi.router> save config