add get timezone

This commit is contained in:
Zachary Boyd 2017-03-12 14:36:43 -04:00
parent 48d8e3fe5b
commit dbae5b0eab
2 changed files with 2 additions and 2 deletions

View file

@ -27,6 +27,5 @@ WORKDIR /app
RUN npm install
# Grab the current local timezone from an external api and save it into /etc/timezone, otherwise Tor will complain and won't start
RUN bash /app/bin/get-timezone.sh > /etc/timezone && dpkg-reconfigure -f noninteractive tzdata
CMD npm start
CMD bash /app/bin/get-timezone.sh > /etc/timezone && dpkg-reconfigure -f noninteractive tzdata && npm start

1
bin/get-timezone.sh Normal file
View file

@ -0,0 +1 @@
curl -sL http://ip-api.com/json | node -e "process.stdin.resume(); process.stdin.on('data', (data) => { process.stdout.write(JSON.parse(data.toString('utf8')).timezone); process.exit(0); });"