mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-26 01:46:18 -05:00
Combining help service install into a script.
This commit is contained in:
parent
844bc9468c
commit
a7805745ab
5 changed files with 24 additions and 16 deletions
|
|
@ -47,10 +47,7 @@ sed -i 's/port = 5433/port = 5432/' /etc/postgresql/15/main/postgresql.conf
|
|||
mkdir /media/wrolpi
|
||||
|
||||
# Install WROLPi Help.
|
||||
git clone https://github.com/wrolpi/wrolpi-help.git /opt/wrolpi-help || :
|
||||
(cd /opt/wrolpi-help && git fetch && git checkout master && git reset --hard origin/master)
|
||||
python3 -m venv /opt/wrolpi-help/venv
|
||||
/opt/wrolpi-help/venv/bin/pip3 install -r /opt/wrolpi-help/requirements.txt
|
||||
/opt/wrolpi/scripts/install_help_service.sh
|
||||
|
||||
cp /opt/wrolpi/etc/raspberrypios/wrolpi-*.service /etc/systemd/system/
|
||||
cp /opt/wrolpi/etc/raspberrypios/wrolpi.target /etc/systemd/system/
|
||||
|
|
|
|||
|
|
@ -55,10 +55,7 @@ usermod -aG _renderd wrolpi
|
|||
chown -R _renderd:_renderd /var/cache/renderd/tiles
|
||||
|
||||
# Install WROLPi Help.
|
||||
git clone https://github.com/wrolpi/wrolpi-help.git /opt/wrolpi-help || :
|
||||
(cd /opt/wrolpi-help && git fetch && git checkout master && git reset --hard origin/master)
|
||||
python3 -m venv /opt/wrolpi-help/venv
|
||||
/opt/wrolpi-help/venv/bin/pip3 install -r /opt/wrolpi-help/requirements.txt
|
||||
/opt/wrolpi/scripts/install_help_service.sh
|
||||
|
||||
# Create the media directory for the wrolpi user.
|
||||
echo '/dev/sda1 /media/wrolpi auto defaults,nofail 0 0' | tee -a /etc/fstab
|
||||
|
|
|
|||
|
|
@ -39,10 +39,7 @@ if [[ ! -f /opt/wrolpi-blobs/gis-map.dump.gz || ! -s /opt/wrolpi-blobs/gis-map.d
|
|||
fi
|
||||
|
||||
# Install WROLPi Help.
|
||||
git clone https://github.com/wrolpi/wrolpi-help.git /opt/wrolpi-help || :
|
||||
(cd /opt/wrolpi-help && git fetch && git checkout master && git reset --hard origin/master)
|
||||
python3 -m venv /opt/wrolpi-help/venv
|
||||
/opt/wrolpi-help/venv/bin/pip3 install -r /opt/wrolpi-help/requirements.txt
|
||||
/opt/wrolpi/scripts/install_help_service.sh
|
||||
|
||||
# Repair will install configs and restart services.
|
||||
/opt/wrolpi/repair.sh
|
||||
|
|
|
|||
20
scripts/install_help_service.sh
Executable file
20
scripts/install_help_service.sh
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Re-execute this script if it wasn't called with sudo.
|
||||
if [ $EUID != 0 ]; then
|
||||
sudo "$0" "$@"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
set -x
|
||||
set -e
|
||||
|
||||
# Install WROLPi Help repo.
|
||||
git clone https://github.com/wrolpi/wrolpi-help.git /opt/wrolpi-help || :
|
||||
(cd /opt/wrolpi-help && git fetch && git checkout master && git reset --hard origin/master)
|
||||
python3 -m venv /opt/wrolpi-help/venv
|
||||
/opt/wrolpi-help/venv/bin/pip3 install -r /opt/wrolpi-help/requirements.txt
|
||||
|
||||
# Install the systemd service.
|
||||
cp /opt/wrolpi/etc/raspberrypios/wrolpi-help.service /etc/systemd/system/
|
||||
systemctl enable wrolpi-help.service
|
||||
|
|
@ -39,10 +39,7 @@ if [[ ! -f /opt/wrolpi-blobs/gis-map.dump.gz || ! -s /opt/wrolpi-blobs/gis-map.d
|
|||
fi
|
||||
|
||||
# Install WROLPi Help.
|
||||
git clone https://github.com/wrolpi/wrolpi-help.git /opt/wrolpi-help || :
|
||||
(cd /opt/wrolpi-help && git fetch && git checkout master && git reset --hard origin/master)
|
||||
python3 -m venv /opt/wrolpi-help/venv
|
||||
/opt/wrolpi-help/venv/bin/pip3 install -r /opt/wrolpi-help/requirements.txt
|
||||
/opt/wrolpi/scripts/install_help_service.sh
|
||||
|
||||
# Repair will install configs and restart services.
|
||||
/opt/wrolpi/repair.sh
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue