Advertisement
SuPeRMiNoR3

95_bind.lua

Dec 8th, 2014
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. network = require("network")
  2. event = require("event")
  3. fs = require("filesystem")
  4.  
  5. function start()
  6. os.sleep(0.5)
  7. f = io.open("/etc/hostname")
  8. name = f:read()
  9. f:close()
  10. network.ip.bind(name)
  11. print("Binding to hostname: "..name)
  12. end
  13.  
  14. if fs.exists("/etc/hostname") then
  15. event.listen("init", start)
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement