![]() |
|
Change IP-address in script - Printable Version +- LogicMachine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Change IP-address in script (/showthread.php?tid=4712) |
Change IP-address in script - Trond Hoyem - 13.04.2023 Hi Is it possible to change the IP-address and other IP-settings via sctipt in LM/SL? I would like to create a page where the user can log in and do changes to all IP-settings without having admin-access to the SL. RE: Change IP-address in script - admin - 13.04.2023 See this: https://forum.logicmachine.net/showthread.php?tid=2162 RE: Change IP-address in script - merel - 14.04.2023 Code: require('uci')
uci.set('network', 'lan', 'ipaddr', '192.168.1.10')
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.commmit('network') |