Also noch mal den Hauptteil, die variable $stdout scheint immer leer zu sein, egal ob Receive erscheint oder nicht:
AutoIt
#include <File.au3>
#include <MsgBoxConstants.au3>
#include <File.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <MsgBoxConstants.au3>
#include <FileConstants.au3>
#include <WinAPIFiles.au3>
HotKeySet("{ESC}", "AbortScript") ; Abbrechen mit Escape-Taste
Global $usb = _checkBackVolume()
Global $rueckgabe = ''
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Pfade bitte ggf. anpassen
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Global $ServerIP = "87.106.128.49"
Global $bash = 'C:\cygwin64\bin\bash.exe'
Local $targetPath = "/cygdrive/" & $usb & "/linuxback/koha/"
Local $sourcePath = "/var/backup/"
Local $sourcePath2 = "/"
Local $sourcePath3 = "/"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
_checkDomain()
_CheckAndCreateBacksServerFolder()
_ProgressGUI()
;MAIN
; Kopierbefehl
Local $bashCommand = $bash & ' -l -c "rsync -azP --delete --progress -e /usr/bin/ssh.exe root@' & $serverIP & ':' & $sourcePath & ' ' & $targetPath & '"'
ConsoleWrite("Bash-Befehl: " & $bashCommand & @CRLF) ; Konsolenausgabe
Local $iPID = RunWait($bashCommand, "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
If @error Then
MsgBox(16, '', 'Fehler beim Ausführen des Befehls')
Exit
EndIf
Local $sStdOut = ""
Local $authOKFound = False
If StdOutRead($ipid,True) Then $rueckgabe &= StdERead($ipid)
;MsgBox(262144,"Title", $rueckgabe)
While 1
$sStdOut &= StdoutRead($iPID)
Sleep(2000)
MsgBox(262144,"Title", $sStdOut)
If @error Then ExitLoop
If not StringInStr($sStdOut, "receiving") Then
ConsoleWrite("Authentifizierung ok" & @CRLF)
$authOKFound = True
SplashTextOn("", "Authentifizierung ok", 300, 50, @DesktopWidth - 320, 30, $DLG_TEXTLEFT + $DLG_NOTITLE + $DLG_MOVEABLE, "Arial", 11, 4000) ; 4 Sekunden lang Popup anzeigen
Sleep(4000) ; Sicherstellen, dass das Popup ausreichend Zeit hat, um angezeigt zu werden
SplashOff()
ExitLoop
EndIf
Wend
If Not $authOKFound Then
MsgBox(16, '', 'Keine Authentifizierung möglich, Sie verfügen nicht über entsprechende RSA Schlüssel')
Exit
EndIf
_MoveProgressBar()
_ErfolgsMSG()
_MoveProgressBar()
_MoveProgressBar()
_MoveProgressBar()
GUIDelete()
Alles anzeigen