Skip to content

Commit

Permalink
Create manual-creator.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
AmirSbss committed Jan 7, 2017
1 parent 4dfda7c commit 6704837
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions manual-creator.lua
@@ -0,0 +1,11 @@
redis = (loadfile "redis.lua")()
io.write("Enter Tabchi ID : ")
local last = io.read()
io.write("\nEnter Full Sudo ID : ")
local sudo=io.read()
local text,ok = io.open("base.lua",'r'):read('*a'):gsub("TABCHI%-ID",last)
io.open("tabchi-"..last..".lua",'w'):write(text):close()
io.open("tabchi-"..last..".sh",'w'):write("while true; do\n./telegram-cli-1222 -p tabchi-"..last.." -s tabchi-"..last..".lua\ndone"):close()
io.popen("chmod 777 tabchi-"..last..".sh")
redis:set('tabchi:'..last..':fullsudo',sudo)
print("Done!\nNew Tabchi Created...\nID : "..last.."\nFull Sudo : "..sudo.."\nRun : ./tabchi-"..last..".sh")

0 comments on commit 6704837

Please sign in to comment.