(14.05.2020, 07:52)Daniel. Wrote: Try this
Code:------------------------------------
require('uci')
uci.set("system.@system[0].hostname=name63characters")
uci.commit('system')
--------------------------------------
Thank but does not work, maybe it's also me
(14.05.2020, 07:55)admin Wrote: What Daniel posted will work but you will have to reboot for hostname to change. You should also write to hostname file in order to change it right away:
Code:io.writefile('/proc/sys/kernel/hostname', 'myhostname')
worked but the old name is adopted after a restart