update
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
# Bash script to stop BGP server on Linux
|
||||
# BGP Server Stop Script
|
||||
|
||||
echo -e "\033[33mStopping BGP Server...\033[0m"
|
||||
|
||||
# Stop the BGP server
|
||||
echo -e "\033[33mStopping BGP containers...\033[0m"
|
||||
docker-compose down
|
||||
|
||||
# Remove volumes (optional - uncomment if you want to clean up completely)
|
||||
# echo -e "\033[33mRemoving volumes...\033[0m"
|
||||
# docker-compose down -v
|
||||
|
||||
# Check if containers are stopped
|
||||
running_containers=$(docker ps --filter "name=bgp-server" --format "{{.Names}}")
|
||||
if [ -n "$running_containers" ]; then
|
||||
echo -e "\033[31mWarning: Some BGP containers are still running:\033[0m"
|
||||
echo -e "\033[31m$running_containers\033[0m"
|
||||
else
|
||||
echo -e "\033[32mBGP Server stopped successfully!\033[0m"
|
||||
fi
|
||||
|
||||
# Show stopped containers
|
||||
echo -e "\n\033[36mContainer status:\033[0m"
|
||||
docker ps -a --filter "name=bgp-server" --format "table {{.Names}}\t{{.Status}}"
|
||||
|
||||
echo -e "\n\033[33mTo start the server again, run: ./start-bgp-server.sh\033[0m"
|
||||
Reference in New Issue
Block a user