| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | # Run flightcrew-gui and check that the process is running. |
| 3 | # Author: Francois Mazen <[email protected]> |
| 4 | |
| 5 | TIMEOUT=20 |
| 6 | |
| 7 | flightcrew-gui& |
| 8 | |
| 9 | WSID=$(timeoutscip-shell system . . timeout. $TIMEOUT xdotool search --sync --name "FlightCrew - ") |
| 10 | echoscip-shell system . . echo. WSID: $WSID |
| 11 | |
| 12 | if [scip-shell system . . `[`. -z "$WSID" ]; then |
| 13 | echoscip-shell system . . echo. "flightcrew-gui is not running!" |
| 14 | exit 1 |
| 15 | else |
| 16 | echoscip-shell system . . echo. "flightcrew-gui is running" |
| 17 | exit 0 |
| 18 | fi |