-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstop.sh
More file actions
executable file
·42 lines (33 loc) · 1.03 KB
/
stop.sh
File metadata and controls
executable file
·42 lines (33 loc) · 1.03 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
#!/bin/bash
# kindmesh Application Stopper
# This script stops the kindmesh application running in Docker Compose
echo "=== KindMesh Application Stopper ==="
# Check if Docker is installed
if ! command -v docker &> /dev/null; then
echo "Error: Docker is not installed or not in PATH"
exit 1
fi
# Check if Docker Compose is installed
if ! command -v docker-compose &> /dev/null; then
echo "Error: Docker Compose is not installed or not in PATH"
exit 1
fi
# Check if the application is running
if ! [ "$(docker ps -q -f name=kindmesh-app)" ] && ! [ "$(docker ps -q -f name=kindmesh-neo4j)" ]; then
echo "KindMesh application is not running!"
exit 0
fi
# Stop the containers
echo "Stopping KindMesh application..."
docker-compose down
if [ $? -ne 0 ]; then
echo "Error: Failed to stop the application"
echo "Please check the error messages above and try again"
exit 1
fi
echo ""
echo "=== KindMesh Application Stopped Successfully! ==="
echo ""
echo "To start the application again, run: ./start.sh"
echo ""
exit 0