#!/bin/bash DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" if systemctl list-unit-files | grep -q "web-giao-ban-go.service"; then sudo systemctl status web-giao-ban-go --no-pager exit 0 fi PID=$(pgrep -f "$DIR/web-giao-ban" || true) if [ -n "$PID" ]; then echo "● web-giao-ban (Go) is RUNNING (PID: $PID)" else echo "○ web-giao-ban (Go) is STOPPED" fi