Skip to content

Commit

Permalink
geofabrik index bugfix, pg15 fix, give pat sudo for updates
Browse files Browse the repository at this point in the history
  • Loading branch information
pnoll1 committed Jan 23, 2023
1 parent 93c367b commit 08ba216
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions osmand_osm/osm/setup_app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,16 @@ cp batch.xml.template batch.xml
sudo -u postgres createdb gis
sudo -u postgres psql -d gis -c "create extension postgis;"
# Change user to your username
sudo -u postgres psql -d gis -c "create user pat with password 'password';"
sudo -u postgres psql -d gis -c "create user pat with password 'password';"
# give user own schema where tables will be created
sudo -u postgres psql -d gis -c "create schema authorization pat"
# Download Geofabrik index to same folder as script
cd $install_dir/osmand_osm/osm
wget https://download.geofabrik.de/index-v1.json
wget -O geofabrik_index-v1.json https://download.geofabrik.de/index-v1.json
touch secrets.py
echo "add OA token obtained from OA website in secrets.py as oa_token = 'token_data'"
cp config.template config.py
# Change details in config.py if needed
sudo chown -R pat /home/pat/projects

# give pat sudo for updates
echo 'pat ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/pat

0 comments on commit 08ba216

Please sign in to comment.