Skip to content

Commit

Permalink
Clean Script
Browse files Browse the repository at this point in the history
  • Loading branch information
jacar-javi committed Mar 22, 2024
1 parent d1686f8 commit 3152c2f
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
LAST_PWD=`pwd`
cd "$(dirname "$0")"

read -r -p "All existing data will be removed. Do you want to continue? [y/N] " response
case $response in
[yY][eE][sS]|[yY])
docker compose down & > /dev/null
docker image prune -a -f & > /dev/null
sudo rm -rf data/crowdsec || true
sudo rm -rf data/mysql || true
sudo rm -rf data/portainer || true
sudo rm -rf data/traefik/acme.json || true
sudo rm -rf secrets/traefik_forward_oauth || true
sudo rm -rf logs || true
sudo rm -rf .env || true
;;
*)
exit -1
;;
esac

cd $LAST_PWD

0 comments on commit 3152c2f

Please sign in to comment.