mirror of
https://github.com/calibrain/shelfmark.git
synced 2026-09-24 18:31:43 +01:00
Add timezone fallback for tor container (#133)
This commit is contained in:
@@ -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: .
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user