Start complex UNIX-Script with wodSSH - WeOnlyDo Discussion board

Start complex UNIX-Script with wodSSH (wodSSH / wodSSH.NET)

by Zitterbacke, Tuesday, March 28, 2006, 08:24 (6613 days ago)

Hello,

I have a problem with great complex UNIX-Scripts on a LINUX-Server!

wodSSH (2.3.4 Version) in VB6.
With Standard-UNIX-Commandos (example ls -l ), I have no problem's.

wodssh start in a function, with the WaitFor Method, because I will waiting for the prompt:
[code]
Public Function fncWartenEndeSSH(Hostname As String, Login As String, _
Passwort As String, UNIX_Kommando As String) As Variant

On Error GoTo Fehlerauswertung

frmTarn.wodSSH1.Disconnect
frmTarn.wodSSH1.Hostname = Hostname
frmTarn.wodSSH1.Login = Login
frmTarn.wodSSH1.Password = Passwort
frmTarn.wodSSH1.Blocking = True
frmTarn.wodSSH1.StripANSI = True
frmTarn.wodSSH1.Protocol = SSHAuto
frmTarn.wodSSH1.Connect

frmTarn.wodSSH1.WaitFor (Login & @ & LCase(Hostname))

If frmTarn.wodSSH1.DataReady > 0 Then frmTarn.wodSSH1.Receive

fncWartenEndeSSH = (frmTarn.wodSSH1.Execute(UNIX_Kommando & vbLf, Login & @ & LCase(Hostname), 10))

frmTarn.wodSSH1.Disconnect

frmTarn.wodSSH1.ShowStdErrorMessages = True
Exit Function

Fehlerauswertung:
frmTarn.wodSSH1.ShowStdErrorMessages = False
End Function

strUNIX_KOMMANDO = UNIX-Script
Debug.Print strUNIX_KOMMANDO
vntERGEBNIS = fncWartenEndeSSH(SERVER_LNX, SERVER_LNX_LOGIN, SERVER_LNX_PASSWORT, strUNIX_KOMMANDO)

[/code]

The complex UNIX-Script start other scripts and C-programs on Server.
I became a prompt to early in VB6, because UNIX-script is still running. The script ist not finished.
Controlling with 'ps -ef' or 'top' on putty.

Can you help me?

Regards from Bavaria!


Complete thread: