mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-21 07:26:18 -05:00
Use NetworkManager for hotspot. Use _renderd user to import maps.
This commit is contained in:
parent
7904f1e11d
commit
e482c7a88f
3 changed files with 18 additions and 2 deletions
|
|
@ -2,6 +2,10 @@
|
|||
set -e
|
||||
set -x
|
||||
|
||||
# Use Network Manager for Hotspot.
|
||||
apt purge -y hostapd
|
||||
apt autoremove -y
|
||||
|
||||
cat >> /etc/profile << 'EOF'
|
||||
alias ll='ls -lh'
|
||||
alias la='ll -a'
|
||||
|
|
@ -34,6 +38,12 @@ cat >/etc/sudoers.d/90-wrolpi <<'EOF'
|
|||
%wrolpi ALL= NOPASSWD:/usr/bin/systemctl restart renderd.service
|
||||
%wrolpi ALL= NOPASSWD:/usr/bin/systemctl stop renderd.service
|
||||
%wrolpi ALL= NOPASSWD:/usr/bin/systemctl start renderd.service
|
||||
%wrolpi ALL= NOPASSWD:/usr/bin/systemctl restart wrolpi-api.service
|
||||
%wrolpi ALL= NOPASSWD:/usr/bin/systemctl stop wrolpi-api.service
|
||||
%wrolpi ALL= NOPASSWD:/usr/bin/systemctl start wrolpi-api.service
|
||||
%wrolpi ALL= NOPASSWD:/usr/bin/systemctl restart wrolpi-app.service
|
||||
%wrolpi ALL= NOPASSWD:/usr/bin/systemctl stop wrolpi-app.service
|
||||
%wrolpi ALL= NOPASSWD:/usr/bin/systemctl start wrolpi-app.service
|
||||
EOF
|
||||
chmod 660 /etc/sudoers.d/90-wrolpi
|
||||
|
||||
|
|
@ -47,3 +57,6 @@ cp /opt/wrolpi/etc/ubuntu20.04/wrolpi.target /etc/systemd/system/
|
|||
systemctl enable wrolpi-api.service
|
||||
systemctl enable wrolpi-app.service
|
||||
|
||||
# NetworkManager for the hotspot.
|
||||
systemctl enable NetworkManager
|
||||
|
||||
|
|
|
|||
|
|
@ -32,3 +32,6 @@ cp /opt/wrolpi/etc/debian11/index.html \
|
|||
/opt/wrolpi/modules/map/leaflet.js \
|
||||
/opt/wrolpi/modules/map/leaflet.css /var/www/html/
|
||||
chmod 644 /var/www/html/*
|
||||
|
||||
mkdir /var/lib/mod_tile
|
||||
chown -R _renderd:_renderd /var/lib/mod_tile
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ if [[ ${1} == *.osm.pbf ]]; then
|
|||
pbf_path=${MERGED_TMP_FILE}
|
||||
fi
|
||||
|
||||
nice -n 18 osm2pgsql -d gis --create --slim -G --hstore \
|
||||
nice -n 18 osm2pgsql -d gis --create --slim -G --hstore -U _renderd -H 127.0.0.1 \
|
||||
--tag-transform-script /opt/openstreetmap-carto/openstreetmap-carto.lua \
|
||||
-C ${MAX_CACHE} \
|
||||
--number-processes 3 \
|
||||
|
|
@ -70,7 +70,7 @@ elif [[ ${1} == *.dump ]]; then
|
|||
exit 7
|
||||
fi
|
||||
# Import a Postgresql dump.
|
||||
nice -n 18 pg_restore -j3 --no-owner -d gis "${1}"
|
||||
nice -n 18 pg_restore -j3 --no-owner -d gis -U _renderd -h 127.0.0.1 "${1}"
|
||||
else
|
||||
echo "WROLPi: Cannot import unknown map file"
|
||||
exit 8
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue