-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:aqzt/kjyw
- Loading branch information
Showing
3 changed files
with
103 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
Dim rs, ws, fso, conn, stream, connStr, theFolder | ||
Set rs = CreateObject("ADODB.RecordSet") | ||
Set stream = CreateObject("ADODB.Stream") | ||
Set conn = CreateObject("ADODB.Connection") | ||
Set fso = CreateObject("Scripting.FileSystemObject") | ||
connStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=HYTop.mdb;" | ||
|
||
conn.Open connStr | ||
rs.Open "FileData", conn, 1, 1 | ||
stream.Open | ||
stream.Type = 1 | ||
|
||
On Error Resume Next | ||
|
||
Do Until rs.Eof | ||
theFolder = Left(rs("thePath"), InStrRev(rs("thePath"), "\")) | ||
If fso.FolderExists(theFolder) = False Then | ||
createFolder(theFolder) | ||
End If | ||
stream.SetEos() | ||
stream.Write rs("fileContent") | ||
stream.SaveToFile str & rs("thePath"), 2 | ||
rs.MoveNext | ||
Loop | ||
|
||
rs.Close | ||
conn.Close | ||
stream.Close | ||
Set ws = Nothing | ||
Set rs = Nothing | ||
Set stream = Nothing | ||
Set conn = Nothing | ||
|
||
Wscript.Echo "ËùÓÐÎļþÊÍ·ÅÍê±Ï!" | ||
|
||
Sub createFolder(thePath) | ||
Dim i | ||
i = Instr(thePath, "\") | ||
Do While i > 0 | ||
If fso.FolderExists(Left(thePath, i)) = False Then | ||
fso.CreateFolder(Left(thePath, i - 1)) | ||
End If | ||
If InStr(Mid(thePath, i + 1), "\") Then | ||
i = i + Instr(Mid(thePath, i + 1), "\") | ||
Else | ||
i = 0 | ||
End If | ||
Loop | ||
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
Dim rs, ws, fso, conn, stream, connStr, theFolder | ||
Set rs = CreateObject("ADODB.RecordSet") | ||
Set stream = CreateObject("ADODB.Stream") | ||
Set conn = CreateObject("ADODB.Connection") | ||
Set fso = CreateObject("Scripting.FileSystemObject") | ||
connStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=HYTop.mdb;" | ||
|
||
conn.Open connStr | ||
rs.Open "FileData", conn, 1, 1 | ||
stream.Open | ||
stream.Type = 1 | ||
|
||
On Error Resume Next | ||
|
||
Do Until rs.Eof | ||
theFolder = Left(rs("thePath"), InStrRev(rs("thePath"), "\")) | ||
If fso.FolderExists(theFolder) = False Then | ||
createFolder(theFolder) | ||
End If | ||
stream.SetEos() | ||
stream.Write rs("fileContent") | ||
stream.SaveToFile str & rs("thePath"), 2 | ||
rs.MoveNext | ||
Loop | ||
|
||
rs.Close | ||
conn.Close | ||
stream.Close | ||
Set ws = Nothing | ||
Set rs = Nothing | ||
Set stream = Nothing | ||
Set conn = Nothing | ||
|
||
Wscript.Echo "ËùÓÐÎļþÊÍ·ÅÍê±Ï!" | ||
|
||
Sub createFolder(thePath) | ||
Dim i | ||
i = Instr(thePath, "\") | ||
Do While i > 0 | ||
If fso.FolderExists(Left(thePath, i)) = False Then | ||
fso.CreateFolder(Left(thePath, i - 1)) | ||
End If | ||
If InStr(Mid(thePath, i + 1), "\") Then | ||
i = i + Instr(Mid(thePath, i + 1), "\") | ||
Else | ||
i = 0 | ||
End If | ||
Loop | ||
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
#!/bin/sh | ||
echo "脚本作者:火星小刘 web:www.huoxingxiaoliu.com email:[email protected]" | ||
sleep 10 | ||
sleep 3 | ||
zabbixdir=`pwd` | ||
zabbix_version=3.0.9 | ||
zabbix_version=3.2.11 | ||
ip=`ip addr |grep inet |egrep -v "inet6|127.0.0.1" |awk '{print $2}' |awk -F "/" '{print $1}'` | ||
echo "当前目录为:$zabbixdir" | ||
echo "本机ip为:$ip" | ||
cat $zabbixdir/Readme | ||
#cat $zabbixdir/Readme | ||
read -p "what's zabbix-server-IP ?:" ServerIP | ||
echo "zabbix服务器ip为:$ServerIP" | ||
read -p "zabbix-server-IP is $ServerIP yes or no:" isY | ||
|
@@ -23,8 +23,8 @@ useradd -g zabbix zabbix | |
|
||
echo "安装zabbix-agent" | ||
sleep 3 | ||
#wget http://netix.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/$zabbix_version/zabbix-${zabbix_version}.tar.gz | ||
wget http://$ServerIP/zabbix/zabbix-${zabbix_version}.tar.gz | ||
wget http://netix.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/$zabbix_version/zabbix-${zabbix_version}.tar.gz | ||
#wget http://$ServerIP/zabbix/zabbix-${zabbix_version}.tar.gz | ||
tar zxvf $zabbixdir/zabbix-${zabbix_version}.tar.gz | ||
cd $zabbixdir/zabbix-${zabbix_version} | ||
echo `pwd` | ||
|