#!/bin/bash SERVICE_NAME="gradio.service" echo "Stopping $SERVICE_NAME..." sudo systemctl stop $SERVICE_NAME if ! sudo systemctl is-active --quiet $SERVICE_NAME; then echo "$SERVICE_NAME stopped successfully." else echo "Failed to stop $SERVICE_NAME. It may still be running." fi