Update setup.lua

This commit is contained in:
CadenCoaster
2025-08-05 20:40:47 -07:00
committed by GitHub
parent ab500067d3
commit bc49f207c9

View File

@@ -8,23 +8,26 @@ end
term.write("setup netmountcc? (Y/n)") term.write("setup netmountcc? (Y/n)")
if isYes(read()) then if isYes(read()) then
term.write("url: ") term.write("url: ")
local url = read() local url = read()
term.write("user: ") term.write("user: ")
local user = read() local user = read()
term.write("pass: ") term.write("pass: ")
local pass = read("*") local pass = read()
if http.checkURL(url) then term.clear()
settings.set("netmount.url",url) term.setCursorPos(1,1)
settings.set("netmount.username",user) if http.checkURL(url) then
settings.set("netmount.password",pass) settings.set("netmount.url",url)
settings.set("netmount.path","/cloud") settings.set("netmount.username",user)
settings.save() settings.set("netmount.password",pass)
fs.makeDir("/startup") settings.set("netmount.path","/cloud")
local file = fs.open("/startup/-01_mount.lua","w") settings.save()
file.write(http.get(url.."/mount.lua").readAll()) fs.makeDir("/startup")
file.close() local file = fs.open("/startup/-01_mount.lua","w")
end file.write(http.get(url.."/mount.lua").readAll())
file.close()
end
print("done setting up netmountcc!")
end end
os.reboot() os.reboot()