Combining help service install into a script.

This commit is contained in:
Roland 2023-11-23 15:49:01 -07:00
parent 844bc9468c
commit a7805745ab
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
5 changed files with 24 additions and 16 deletions

View file

@ -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
View 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

View file

@ -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