From a5a3d2ee1b5933c2b1a0ee704d6b3d992c2a8d45 Mon Sep 17 00:00:00 2001 From: Roland Date: Fri, 4 Nov 2022 08:34:15 -0600 Subject: [PATCH] Using /usr/bin/env bash. --- scripts/import_map.sh | 2 +- scripts/initialize_map.sh | 2 +- scripts/install_debian_11.sh | 2 +- scripts/install_map_debian_11.sh | 2 +- scripts/install_map_ubuntu_20.04.sh | 2 +- scripts/install_ubuntu_20.04.sh | 2 +- scripts/reset_map.sh | 11 ++++++++--- 7 files changed, 14 insertions(+), 9 deletions(-) diff --git a/scripts/import_map.sh b/scripts/import_map.sh index e508137d..814cd2f5 100755 --- a/scripts/import_map.sh +++ b/scripts/import_map.sh @@ -1,4 +1,4 @@ -#!/bin/bash -ex +#!/usr/bin/env bash -ex MERGED_TMP_FILE=/tmp/wrolpi-merged.osm.pbf diff --git a/scripts/initialize_map.sh b/scripts/initialize_map.sh index 465e168a..f5bf9723 100755 --- a/scripts/initialize_map.sh +++ b/scripts/initialize_map.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [ ! -d /opt/openstreetmap-carto ]; then echo "/opt/openstreetmap-carto does not exist. Run install.sh!" diff --git a/scripts/install_debian_11.sh b/scripts/install_debian_11.sh index 0abc01cc..e2df0ee1 100755 --- a/scripts/install_debian_11.sh +++ b/scripts/install_debian_11.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash echo "Debian 11 install start: $(date '+%Y-%m-%d %H:%M:%S')" set -x diff --git a/scripts/install_map_debian_11.sh b/scripts/install_map_debian_11.sh index 41de321e..97f5f1b1 100755 --- a/scripts/install_map_debian_11.sh +++ b/scripts/install_map_debian_11.sh @@ -1,4 +1,4 @@ -#! /usr/bin/bash +#! /usr/usr/bin/env bash # This script installs OpenStreetMap tile server. # This server uses Apache2, renderd, and mod_tile to render and display map tiles. diff --git a/scripts/install_map_ubuntu_20.04.sh b/scripts/install_map_ubuntu_20.04.sh index cfee73cd..823ca660 100755 --- a/scripts/install_map_ubuntu_20.04.sh +++ b/scripts/install_map_ubuntu_20.04.sh @@ -1,4 +1,4 @@ -#! /usr/bin/bash +#! /usr/bin/env bash # This script installs OpenStreetMap tile server. # This server uses Apache2, renderd, and mod_tile to render and display map tiles. diff --git a/scripts/install_ubuntu_20.04.sh b/scripts/install_ubuntu_20.04.sh index b5973b3e..06b1c0d5 100755 --- a/scripts/install_ubuntu_20.04.sh +++ b/scripts/install_ubuntu_20.04.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash echo "Ubuntu 20.04 install start: $(date '+%Y-%m-%d %H:%M:%S')" set -x diff --git a/scripts/reset_map.sh b/scripts/reset_map.sh index 987c6ed7..baedf1cb 100755 --- a/scripts/reset_map.sh +++ b/scripts/reset_map.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Use 1/4 of the RAM to import. 1/2 causes crashes on RPi. RAM_KB=$(grep MemTotal /proc/meminfo | awk '{print $2}') @@ -79,6 +79,11 @@ sudo -u postgres psql -d gis -c "ALTER TABLE spatial_ref_sys OWNER TO wrolpi;" # Reset "imported" status of any map files. sudo -u postgres psql -d wrolpi -c "UPDATE map_file SET imported=false" -/opt/wrolpi/scripts/initialize_map.sh +bash /opt/wrolpi/scripts/initialize_map.sh -echo "Map has been reset" +echo "Map has been reset. + +Restart renderd with: + + # sudo systemctl restart renderd +"