kill puma pid local

# Step 1: Find the Puma process ID (PID) using the `ps` command and filter for the Puma process
puma_pid = `ps aux | grep 'puma' | grep -v 'grep' | awk '{print $2}'`.strip

# Step 2: Check if a Puma process is running
if puma_pid.empty?
  puts "No Puma process found."
else
  # Step 3: Send a SIGTERM signal to gracefully terminate the Puma process
  Process.kill("TERM", puma_pid.to_i)
  puts "Sent SIGTERM signal to Puma process #{puma_pid}."
end