diff --git a/reset.sh b/reset.sh index e00a308..381cf24 100755 --- a/reset.sh +++ b/reset.sh @@ -1,12 +1,15 @@ #!/bin/bash +cd "$(dirname "$0")" +. .env -# Uncomment if rotating IPv6 -# echo "Rotating IP..." -# python3 smart-ipv6-rotator/smart-ipv6-rotator.py run --ipv6range=2001:db8::/32 +if [ -n $IPV6_SUBNET ]; then + echo "Rotating IP..." + python3 smart-ipv6-rotator/smart-ipv6-rotator.py run --ipv6range=$IPV6_SUBNET +fi echo "Updating..." docker compose pull echo "Restarting..." docker compose down -docker compose up -d \ No newline at end of file +docker compose up -d