18.08.2022, 06:59
You can use HTTP for this. See Apps documentation on how to create .lp server-side scripts: https://forum.logicmachine.net/showthread.php?tid=85
Code:
-- overwrite init script
io.writefile('/usr/share/lua/genohm-scada/initscript.lua', script)
-- set network config
require('uci')
uci.set('network', 'lan', 'ipaddr', '192.168.1.2')
uci.set('network', 'lan', 'netmask', '255.255.255.0')
uci.set('network', 'lan', 'gateway', '192.168.1.1')
uci.set('network', 'lan', 'dns', '8.8.8.8')
uci.commit('network')
-- reboot
os.execute('reboot')