Add timezone fallback for tor container (#133)

This commit is contained in:
CaliBrain
2025-04-15 08:14:08 -04:00
committed by GitHub
parent 0a553e6794
commit c2decb8c4f
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
services:
calibre-web-automated-book-downloader-tor-dev:
extends:
file: ./docker-compose.yml
file: ./docker-compose.tor.yml
service: calibre-web-automated-book-downloader-tor
build:
context: .
+4 -1
View File
@@ -73,7 +73,10 @@ fi
# Then set the timezone
# Get timezone from IP
TIMEZONE=$(pyrequests https://ipapi.co/timezone)
TIMEZONE=$(pyrequests https://ipapi.co/timezone) ||
TIMEZONE=$(pyrequests http://worldtimeapi.org/api/ip | grep -oP '"timezone":"\K[^"]+') ||
true
# If TIMEZONE is not set, use the default timezone
echo "[*] Current Timezone : $(date +%Z). IP Timezone: $TIMEZONE"