'Get Raspberry Pi Information via Bash Script.
'The Bash Scripts creates several information files (text format, extension .inf)
Sub GetRasPiInfo
Try
shl.Initialize("shl", "./rpiinfo.sh", Null)
shl.WorkingDirectory = File.DirApp
shl.Run(-1)
Catch
Log(LastException.Message)
End Try
End Sub
Sub shl_ProcessCompleted (Success As Boolean, ExitCode As Int, StdOut As String, StdErr As String)
'Process successfully completed
'As an example start MQTT and update the RasPi information in Domoticz Home Automation after reading the Bash Script output files.
If Success And ExitCode = 0 Then
Log("Shell Command Successfull: MQTT connection initiated, data read and converted, published...")
Else
Log("Shell Command Error: " & StdErr)
End If
End Sub