-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstop.sh
More file actions
executable file
·44 lines (36 loc) · 1.24 KB
/
stop.sh
File metadata and controls
executable file
·44 lines (36 loc) · 1.24 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env bash
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# SerialAgent — stop all services
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
set -euo pipefail
ROOT="$(cd "$(dirname "$0")" && pwd)"
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
ok() { echo -e "${GREEN}[✓]${NC} $1"; }
warn() { echo -e "${YELLOW}[!]${NC} $1"; }
# Stop gateway
if pkill -f "serialagent serve" 2>/dev/null; then
ok "Gateway stopped"
else
warn "Gateway was not running"
fi
# Stop OpenBB
if pkill -f "openbb-api" 2>/dev/null; then
ok "OpenBB stopped"
else
warn "OpenBB was not running"
fi
# Stop SearXNG (Docker)
if docker stop serialagent-searxng 2>/dev/null; then
ok "SearXNG stopped"
else
warn "SearXNG was not running"
fi
# Stop SerialMemory
if pkill -f "serial.memory" 2>/dev/null || pkill -f "serialmemory" 2>/dev/null; then
ok "SerialMemory stopped"
else
warn "SerialMemory was not running"
fi
ok "All services stopped"