2024-06-27 06:03:32 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Copyright The Mbed TLS Contributors
|
|
|
|
# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# The server creates some local files when it starts up so we can wait for this
|
|
|
|
# event as signal that the server is ready so that we can start client(s).
|
|
|
|
function wait_for_server_startup() {
|
2024-07-18 13:21:20 +00:00
|
|
|
while [ -z $(find /tmp -maxdepth 1 -name "psa_notify_*" -printf 1 -quit) ]; do
|
2024-06-27 06:03:32 +00:00
|
|
|
sleep 0.1
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
$(dirname "$0")/kill_server.sh
|
|
|
|
|
|
|
|
$(dirname "$0")/psa_server &
|
|
|
|
wait_for_server_startup
|