Skip to content

Commit a70fd39

Browse files
committed
Merge branch 'master' of github.com:aqzt/kjyw
2 parents a0c8bac + 9407a82 commit a70fd39

File tree

3 files changed

+103
-5
lines changed

3 files changed

+103
-5
lines changed

windows/vbs/unpack.vbs

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
Dim rs, ws, fso, conn, stream, connStr, theFolder
2+
Set rs = CreateObject("ADODB.RecordSet")
3+
Set stream = CreateObject("ADODB.Stream")
4+
Set conn = CreateObject("ADODB.Connection")
5+
Set fso = CreateObject("Scripting.FileSystemObject")
6+
connStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=HYTop.mdb;"
7+
8+
conn.Open connStr
9+
rs.Open "FileData", conn, 1, 1
10+
stream.Open
11+
stream.Type = 1
12+
13+
On Error Resume Next
14+
15+
Do Until rs.Eof
16+
theFolder = Left(rs("thePath"), InStrRev(rs("thePath"), "\"))
17+
If fso.FolderExists(theFolder) = False Then
18+
createFolder(theFolder)
19+
End If
20+
stream.SetEos()
21+
stream.Write rs("fileContent")
22+
stream.SaveToFile str & rs("thePath"), 2
23+
rs.MoveNext
24+
Loop
25+
26+
rs.Close
27+
conn.Close
28+
stream.Close
29+
Set ws = Nothing
30+
Set rs = Nothing
31+
Set stream = Nothing
32+
Set conn = Nothing
33+
34+
Wscript.Echo "ËùÓÐÎļþÊÍ·ÅÍê±Ï!"
35+
36+
Sub createFolder(thePath)
37+
Dim i
38+
i = Instr(thePath, "\")
39+
Do While i > 0
40+
If fso.FolderExists(Left(thePath, i)) = False Then
41+
fso.CreateFolder(Left(thePath, i - 1))
42+
End If
43+
If InStr(Mid(thePath, i + 1), "\") Then
44+
i = i + Instr(Mid(thePath, i + 1), "\")
45+
Else
46+
i = 0
47+
End If
48+
Loop
49+
End Sub

windows/vbs/unpack0.vbs

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
Dim rs, ws, fso, conn, stream, connStr, theFolder
2+
Set rs = CreateObject("ADODB.RecordSet")
3+
Set stream = CreateObject("ADODB.Stream")
4+
Set conn = CreateObject("ADODB.Connection")
5+
Set fso = CreateObject("Scripting.FileSystemObject")
6+
connStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=HYTop.mdb;"
7+
8+
conn.Open connStr
9+
rs.Open "FileData", conn, 1, 1
10+
stream.Open
11+
stream.Type = 1
12+
13+
On Error Resume Next
14+
15+
Do Until rs.Eof
16+
theFolder = Left(rs("thePath"), InStrRev(rs("thePath"), "\"))
17+
If fso.FolderExists(theFolder) = False Then
18+
createFolder(theFolder)
19+
End If
20+
stream.SetEos()
21+
stream.Write rs("fileContent")
22+
stream.SaveToFile str & rs("thePath"), 2
23+
rs.MoveNext
24+
Loop
25+
26+
rs.Close
27+
conn.Close
28+
stream.Close
29+
Set ws = Nothing
30+
Set rs = Nothing
31+
Set stream = Nothing
32+
Set conn = Nothing
33+
34+
Wscript.Echo "ËùÓÐÎļþÊÍ·ÅÍê±Ï!"
35+
36+
Sub createFolder(thePath)
37+
Dim i
38+
i = Instr(thePath, "\")
39+
Do While i > 0
40+
If fso.FolderExists(Left(thePath, i)) = False Then
41+
fso.CreateFolder(Left(thePath, i - 1))
42+
End If
43+
If InStr(Mid(thePath, i + 1), "\") Then
44+
i = i + Instr(Mid(thePath, i + 1), "\")
45+
Else
46+
i = 0
47+
End If
48+
Loop
49+
End Sub

zabbix/agent-install.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#!/bin/sh
22
echo "脚本作者:火星小刘 web:www.huoxingxiaoliu.com email:[email protected]"
3-
sleep 10
3+
sleep 3
44
zabbixdir=`pwd`
5-
zabbix_version=3.0.9
5+
zabbix_version=3.2.11
66
ip=`ip addr |grep inet |egrep -v "inet6|127.0.0.1" |awk '{print $2}' |awk -F "/" '{print $1}'`
77
echo "当前目录为:$zabbixdir"
88
echo "本机ip为:$ip"
9-
cat $zabbixdir/Readme
9+
#cat $zabbixdir/Readme
1010
read -p "what's zabbix-server-IP ?:" ServerIP
1111
echo "zabbix服务器ip为:$ServerIP"
1212
read -p "zabbix-server-IP is $ServerIP yes or no:" isY
@@ -23,8 +23,8 @@ useradd -g zabbix zabbix
2323

2424
echo "安装zabbix-agent"
2525
sleep 3
26-
#wget http://netix.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/$zabbix_version/zabbix-${zabbix_version}.tar.gz
27-
wget http://$ServerIP/zabbix/zabbix-${zabbix_version}.tar.gz
26+
wget http://netix.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/$zabbix_version/zabbix-${zabbix_version}.tar.gz
27+
#wget http://$ServerIP/zabbix/zabbix-${zabbix_version}.tar.gz
2828
tar zxvf $zabbixdir/zabbix-${zabbix_version}.tar.gz
2929
cd $zabbixdir/zabbix-${zabbix_version}
3030
echo `pwd`

0 commit comments

Comments
 (0)