Reboot Lua or the Hardware

n = tools.reboot(which, [sec])

Reboot either Lua or the ip.buffer (i.e. a cold boot).

Parameter Type Description
which string What to reboot: Lua or ip.buffer
sec integer Value for ip.buffer choice. (0 cancels)
Returns Type Description
n integer Previous seconds counter

e.g.

tools.reboot('Lua')  -- reboot Lua

local ttr = tools.reboot('ip.buffer', -1) -- return time to reboot
tools.reboot('ip.buffer', 60) -- reboot in one minute
tools.reboot('ip.buffer', -1) -- cancel reboot