Skip to content

Commit

Permalink
feat(uninstall.sh): ask user for confirmation
Browse files Browse the repository at this point in the history
  • Loading branch information
AnonymousWP committed Sep 6, 2023
1 parent 3e625dd commit 2a0e620
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions scripts/uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,27 @@ if [ "$EUID" -ne 0 ]
exit
fi

echo "Stopping reNgine"
docker stop rengine-web-1 rengine-db-1 rengine-celery-1 rengine-celery-beat-1 rengine-redis-1 rengine-tor-1 rengine-proxy-1
read -p "This action will remove all containers, volumes and networks of reNgine. Do you want to continue? [y/n] " -n 1 -r
echo ""

if [[ $REPLY =~ ^[Yy]$ ]]
then
echo "Stopping reNgine"
docker stop rengine-web-1 rengine-db-1 rengine-celery-1 rengine-celery-beat-1 rengine-redis-1 rengine-tor-1 rengine-proxy-1

echo "Removing all containers related to reNgine"
docker rm rengine-web-1 rengine-db-1 rengine-celery-1 rengine-celery-beat-1 rengine-redis-1 rengine-tor-1 rengine-proxy-1
echo "Removed all containers"
echo "Removing all containers related to reNgine"
docker rm rengine-web-1 rengine-db-1 rengine-celery-1 rengine-celery-beat-1 rengine-redis-1 rengine-tor-1 rengine-proxy-1
echo "Removed all containers"

echo "Removing all volumes related to reNgine"
docker volume rm rengine_gf_patterns rengine_github_repos rengine_nuclei_templates rengine_postgres_data rengine_scan_results rengine_tool_config
echo "Removed all volumes"
echo "Removing all volumes related to reNgine"
docker volume rm rengine_gf_patterns rengine_github_repos rengine_nuclei_templates rengine_postgres_data rengine_scan_results rengine_tool_config
echo "Removed all volumes"

echo "Removing all networks related to reNgine"
docker network rm rengine_rengine_network rengine_default
echo "Removing all networks related to reNgine"
docker network rm rengine_rengine_network rengine_default
else
exit 1
fi

read -p "Do you want to remove Docker images related to reNgine? [y/n] " -n 1 -r
echo ""
Expand Down

0 comments on commit 2a0e620

Please sign in to comment.