This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

ftp init-script and reboot from url
#3
(18.08.2022, 06:59)admin Wrote: 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')

Thanks admin!
Reply


Messages In This Thread
RE: ftp init-script and reboot from url - by JohnTH - 18.08.2022, 19:39

Forum Jump: