mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
Reworking Debian install with real system.
This commit is contained in:
parent
6e0f9a999c
commit
7fd8a8527a
3 changed files with 26 additions and 4 deletions
|
|
@ -125,3 +125,7 @@ chown wrolpi:wrolpi /media/wrolpi
|
|||
chown -R wrolpi:wrolpi /home/wrolpi /opt/wrolpi*
|
||||
|
||||
systemctl start wrolpi.target
|
||||
|
||||
set +x
|
||||
|
||||
echo "Repair has completed. You may run /opt/wrolpi/help.sh to check system status."
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ set -e
|
|||
# Update if we haven't updated in the last day.
|
||||
[ -z "$(find -H /var/lib/apt/lists -maxdepth 0 -mtime -1)" ] && apt update
|
||||
# Install dependencies.
|
||||
apt-get install -y < /opt/wrolpi/debian-live-config/config/package-lists/wrolpi.list.chroot
|
||||
apt-get install -y $(cat /opt/wrolpi/debian-live-config/config/package-lists/wrolpi.list.chroot)
|
||||
|
||||
# App dependencies were installed.
|
||||
node -v
|
||||
|
|
@ -24,10 +24,19 @@ npm install || npm install || npm install || npm install # try install multiple
|
|||
python3 -m venv /opt/wrolpi/venv
|
||||
/opt/wrolpi/venv/bin/pip3 install -r /opt/wrolpi/requirements.txt
|
||||
|
||||
# Create the WROLPi user
|
||||
grep wrolpi: /etc/passwd || useradd -md /home/wrolpi wrolpi -s "$(command -v bash)"
|
||||
|
||||
# Get map dependencies.
|
||||
[ -d /opt/openstreetmap-carto ] && chown -R wrolpi:wrolpi /opt/openstreetmap-carto
|
||||
git clone https://github.com/lrnselfreliance/openstreetmap-carto.git /opt/openstreetmap-carto || :
|
||||
sudo -u _renderd /bin/bash -c '(cd /opt/openstreetmap-carto && git fetch && git checkout master && git reset --hard origin/master && git pull --ff)'
|
||||
(cd /opt/openstreetmap-carto && git fetch && git checkout master && git reset --hard origin/master && git pull --ff)
|
||||
chown -R _renderd:_renderd /opt/openstreetmap-carto
|
||||
|
||||
# Get map initialization dump.
|
||||
if [[ ! -f /opt/wrolpi-blobs/gis-map.dump.gz || ! -s /opt/wrolpi-blobs/gis-map.dump.gz ]]; then
|
||||
wget https://wrolpi.nyc3.cdn.digitaloceanspaces.com/gis-map.dump.gz -O /opt/wrolpi-blobs/gis-map.dump.gz
|
||||
fi
|
||||
|
||||
# Repair will install configs and restart services.
|
||||
/opt/wrolpi/repair.sh
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ set -e
|
|||
# Update if we haven't updated in the last day.
|
||||
[ -z "$(find -H /var/lib/apt/lists -maxdepth 0 -mtime -1)" ] && apt update
|
||||
# Install dependencies.
|
||||
apt-get install -y < /opt/wrolpi/pi-gen/stage2/04-wrolpi/01-packages
|
||||
apt-get install -y $(cat /opt/wrolpi/pi-gen/stage2/04-wrolpi/01-packages)
|
||||
|
||||
# App dependencies were installed.
|
||||
node -v
|
||||
|
|
@ -24,10 +24,19 @@ npm install || npm install || npm install || npm install # try install multiple
|
|||
python3 -m venv /opt/wrolpi/venv
|
||||
/opt/wrolpi/venv/bin/pip3 install -r /opt/wrolpi/requirements.txt
|
||||
|
||||
# Create the WROLPi user
|
||||
grep wrolpi: /etc/passwd || useradd -md /home/wrolpi wrolpi -s "$(command -v bash)"
|
||||
|
||||
# Get map dependencies.
|
||||
[ -d /opt/openstreetmap-carto ] && chown -R wrolpi:wrolpi /opt/openstreetmap-carto
|
||||
git clone https://github.com/lrnselfreliance/openstreetmap-carto.git /opt/openstreetmap-carto || :
|
||||
sudo -u _renderd /bin/bash -c '(cd /opt/openstreetmap-carto && git fetch && git checkout master && git reset --hard origin/master && git pull --ff)'
|
||||
(cd /opt/openstreetmap-carto && git fetch && git checkout master && git reset --hard origin/master && git pull --ff)
|
||||
chown -R _renderd:_renderd /opt/openstreetmap-carto
|
||||
|
||||
# Get map initialization dump.
|
||||
if [[ ! -f /opt/wrolpi-blobs/gis-map.dump.gz || ! -s /opt/wrolpi-blobs/gis-map.dump.gz ]]; then
|
||||
wget https://wrolpi.nyc3.cdn.digitaloceanspaces.com/gis-map.dump.gz -O /opt/wrolpi-blobs/gis-map.dump.gz
|
||||
fi
|
||||
|
||||
# Repair will install configs and restart services.
|
||||
/opt/wrolpi/repair.sh
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue