Files
dropshell-templates/squashkiwi-streaming/uninstall.sh
Your Name 11ddc264eb
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 59s
docs: Add 42 files
2025-09-01 14:04:58 +12:00

24 lines
712 B
Bash
Executable File

#!/bin/bash
# shellcheck disable=SC1091
source "${AGENT_PATH}/common.sh"
_check_required_env_vars "PROJECT_NAME" "LOCAL_DATA_FOLDER"
echo "WARNING: This will remove all ${PROJECT_NAME} containers, images, and data!"
echo "Recordings will be permanently deleted."
read -p "Are you sure? (yes/no): " confirmation
if [[ "$confirmation" != "yes" ]]; then
echo "Uninstall cancelled"
exit 0
fi
cd "${LOCAL_DATA_FOLDER}/config" || _die "Failed to change to config directory"
# Stop and remove containers
docker compose down -v --rmi all || true
# Remove local data
echo "Removing local data folder: ${LOCAL_DATA_FOLDER}"
rm -rf "${LOCAL_DATA_FOLDER}"
echo "${PROJECT_NAME} has been completely uninstalled"