Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local shell = require("shell")
- local filesystem = require("filesystem")
- local args = shell.parse(...)
- if args~=nil then
- if args[1] == "help" or args[1] == "?" then
- print("Для установки терминала укажите в порядке следующее:")
- print("Номер_терминала")
- elseif not filesystem.exists("/lib/robot.lua") then
- os.execute("mkdir /home/tmp")
- os.execute("pastebin get vsMN5cvs /home/tmp/cli.lua")
- os.execute("echo 'wlisten_port = " .. (10000+args[1]) .. " ' >> /home/cli.lua")
- os.execute("echo 'robot_port = " .. (20000+args[1]) .. " ' >> /home/cli.lua")
- os.execute("echo 'robot_authkey = " .. (104506008+args[1]) .. " ' >> /home/cli.lua")
- os.execute("cat /home/tmp/cli.lua >> /home/cli.lua")
- os.execute("rm .shrc")
- os.execute("echo '/home/cli.lua' >> /home/.shrc ")
- os.execute("rm -rf /home/tmp")
- else
- os.execute("mkdir /home/tmp")
- os.execute("pastebin get vXX7yiYr /home/tmp/robot.lua")
- os.execute("echo 'port_list = " .. (20000+args[1]) .. " ' >> /home/robot.lua")
- os.execute("echo 'port_dst = " .. (10000+args[1]) .. " ' >> /home/robot.lua")
- os.execute("echo 'robot_authkey = " .. (104506008+args[1]) .. " ' >> /home/robot.lua")
- os.execute("cat /home/tmp/robot.lua >> /home/robot.lua")
- os.execute("rm .shrc")
- os.execute("echo '/home/robot.lua' >> /home/.shrc ")
- os.execute("rm -rf /home/tmp")
- end
- else
- print("Укажи параметры или укажи \"help\" или \"?\"")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement