Applications
Set up the LR54 to automatically run your applications
LR54 User Guide
754
},
"disk_usage": {
"/opt": disk_opt,
"/etc/config:": disk_config,
"ram": ram_used
}
})
client.publish(PREFIX "/system", json.dumps(msg))
runt.start()
serial = runt.get("system.serial")
PREFIX = "router/" + serial
PREFIX_EVENT = "event/" + PREFIX
PREFIX_CMD = "cmd/" + PREFIX
PREFIX_RSP = "rsp/" + PREFIX
client = mqtt.Client()
client.on_connect = on_connect
client.on_message = on_message
try:
client.connect("192.168.1.100", 1883, 60)
client.loop_start()
except:
print("Failed to connect to MQTT server")
sys.exit(1)
while True:
publish_dhcp_leases()
publish_system()
time.sleep(POLL_TIME)
Set up the LR54 to automatically run your applications
This section contains the following topics:
n
Configure scripts to run automatically
n
n
Stop a script that is currently running
Configure scripts to run automatically
You can configure a script or a python application to run automatically when the system restarts, at
specific intervals, or at a specified time. By default, scripts execute in a "sandbox," which restricts
access to the file system and available commands that can be used by the script.
Required configuration items
n
Upload or create the script. The script must be uploaded to /etc/config/scripts or a
subdirectory.
n
Enable the script.
Содержание 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 ...