#!/bin/bash

cd /home/develop/BD

if [ -z "$1" ]
then
  echo "Please provide a username as an argument"
  exit 1
fi

if ! [ -e "enabled_containers/$1.yml" ]
then
  echo "$1 already stopped (or doesn't exist)"
  exit 0
fi

docker rm -f "$1"

rm "enabled_containers/$1.yml"