-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstop.sh
More file actions
executable file
·31 lines (27 loc) · 815 Bytes
/
Copy pathstop.sh
File metadata and controls
executable file
·31 lines (27 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$ROOT_DIR"
# shellcheck disable=SC1091
source "$ROOT_DIR/scripts/runtime_lifecycle.sh"
trap release_lifecycle_lock EXIT
require_process_inspector
acquire_lifecycle_lock
STOP_DOCKER=1
if [[ "${1:-}" == "--no-docker" ]]; then
STOP_DOCKER=0
elif [[ $# -gt 0 ]]; then
echo "Usage: ./stop.sh [--no-docker]" >&2
exit 2
fi
stop_owned_process "frontend" "$ROOT_DIR/web"
stop_owned_process "backend" "$ROOT_DIR"
stop_owned_process "local-model" "$ROOT_DIR"
if [[ "$STOP_DOCKER" == "1" ]]; then
if command -v docker >/dev/null 2>&1 && local_docker_ready; then
require_local_docker_context
ragweld_compose stop
else
echo "Ragweld Docker runtime is unavailable; host-process stop is complete."
fi
fi