#!/bin/bash
# Stop and disable systemd services for Qwen-Image-Edit
set -e

if [[ $EUID -ne 0 ]]; then
   echo "This script must be run as root (use sudo)"
   exit 1
fi

echo "Stopping services..."
systemctl stop comfyui-api.service
systemctl stop comfyui-backend.service

echo "Disabling services..."
systemctl disable comfyui-api.service
systemctl disable comfyui-backend.service

echo "Services stopped and disabled."
