-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathloadfun.lua
71 lines (60 loc) · 1.52 KB
/
loadfun.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
--[[注册文件]]
function reary()
local t={
'comm',
'action',
'catwxw',
'register',
'post',
'mm',
'tantan',
"tanwxw",
'weixi',
'awz'
};
return t;
end
--注册所有方法程序
function loadfunction()
newfiles('/var/touchelf/scripts/scriptfile/images/');
loadimg();
locafebiao();
end
function newfiles(path)
return os.execute("mkdir "..path);
end
function loadimg()
--images--
local a = {"PP.bmp","XX.bmp","dz66.bmp","XSC.bmp","CMM.bmp"}
for k, v in pairs(a) do
if file_exists("/var/touchelf/scripts/scriptfile/images/"..v..".lua") then
flag = ftpGet("ftp://121.40.140.16:/script/public/script/scriptfile/images/"..v, "/var/touchelf/scripts/scriptfile/images/"..v, "productconsole", "T4t8u0p1");
end
end
--images--
end
--安装脚本--
-------------------start执行过程--------------------------------
--注册
----------------------------------------------------
function locafebiao()
flag=true;
local t={'feibiao'};
for k, v in pairs(t) do
if file_exists("/var/touchelf/scripts/"..v..".lua") then
else
getfilestart(v);
notifyMessage('请运行feibiao.lua文件');
os.exit();
end
end
end
function getfilestart(vl)
local flagf = ftpGet("ftp://121.40.140.16:/script/public/script/scriptfile/"..vl..".lua", "/var/touchelf/scripts/"..vl..".lua", "productconsole", "T4t8u0p1");
if flagf then
notifyMessage('加载'..vl..'文件');
else
notifyMessage("加载失败")
end
end
----------------------------------------------------