summarylogtreecommitdiffstats
path: root/pytrainer.sh
blob: c3f926f1cdcd1f685c441c0c6fe20f6788d3a817 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh
# First arg is log level, e.g. -d for DEBUG

# As explained on : https://github.com/pytrainer/pytrainer/issues/158#issuecomment-448475330
# The reason for the non working OSM in pytrainer is, that openlayers.org / cloudfare is sending:
#`Access denied | openlayers.org used Cloudflare to restrict access`
#when using the default user-agent of the python urllib. Changing user-agent to pytrainer solves it:
wget -q -O ${HOME}/.pytrainer/tmp/cache/OpenLayers.js http://www.openlayers.org/api/OpenLayers.js


cd /usr/share/pytrainer
exec python pytrainer "$@"