03.10.2022, 12:57
script.reload('initscript') is not a valid call. The only thing you need to do is write code directly to the init file, no other actions are needed.
Code:
-- overwrite init script
io.writefile('/usr/share/lua/genohm-scada/initscript.lua', scripttext)