change_code/help/nginx/stop.sh

19 lines
383 B
Bash

#!/bin/bash
NGINX_DIR="/home/taoc/nginx"
NGINX_BIN="$NGINX_DIR/sbin/nginx"
echo "Stopping Help Documentation Server..."
if [ ! -f "$NGINX_BIN" ]; then
echo "Error: nginx binary not found at $NGINX_BIN"
exit 1
fi
"$NGINX_BIN" -s stop
if [ $? -eq 0 ]; then
echo "✅ Help Documentation Server stopped successfully"
else
echo "❌ Failed to stop nginx"
exit 1
fi