mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-11 05:29:30 +00:00
27 lines
399 B
Bash
Executable File
27 lines
399 B
Bash
Executable File
#!/bin/sh
|
|
|
|
die() {
|
|
echo $1 >&2
|
|
exit 1
|
|
}
|
|
|
|
if [ $# -lt 1 ]; then
|
|
die "Usage: stop-sandbox PORTS"
|
|
fi
|
|
|
|
exit_status=0
|
|
|
|
for port in "$@"; do
|
|
if ! [ -d "/tmp/$port" ]; then
|
|
echo "MySQL test server on port $port does not exist."
|
|
continue
|
|
fi
|
|
|
|
/tmp/$port/stop
|
|
exit_status=$((exit_status | $?))
|
|
rm -rf /tmp/$port
|
|
exit_status=$((exit_status | $?))
|
|
done
|
|
|
|
exit $exit_status
|