2023-02-24 17:31:08 -07:00
|
|
|
#! /usr/bin/env bash
|
2023-09-24 20:10:09 -06:00
|
|
|
# Installs any new dependencies of the App and API. Uses internet.
|
2023-02-24 17:31:08 -07:00
|
|
|
|
2023-09-24 20:10:09 -06:00
|
|
|
set -e
|
|
|
|
|
set -x
|
2023-05-23 16:41:48 -06:00
|
|
|
|
2023-09-24 20:10:09 -06:00
|
|
|
# Install any App dependencies.
|
|
|
|
|
cd /opt/wrolpi/app || exit 1
|
|
|
|
|
npm install || npm install || npm install || npm install # try install multiple times :(
|
2023-05-01 13:00:23 -06:00
|
|
|
|
2023-09-24 20:10:09 -06:00
|
|
|
# Install any new Python requirements.
|
|
|
|
|
/opt/wrolpi/venv/bin/pip3 install -r /opt/wrolpi/requirements.txt
|
|
|
|
|
# Upgrade the WROLPi database.
|
|
|
|
|
(cd /opt/wrolpi && /opt/wrolpi/venv/bin/python3 /opt/wrolpi/main.py db upgrade)
|
2023-07-11 17:23:56 -06:00
|
|
|
|
2023-11-23 16:20:28 -07:00
|
|
|
# Upgrade WROLPi Help.
|
2023-11-23 16:22:46 -07:00
|
|
|
/opt/wrolpi/scripts/install_help_service.sh || echo "Help install failed."
|
2023-11-23 16:20:28 -07:00
|
|
|
|
2023-09-24 20:10:09 -06:00
|
|
|
# Install any configs, restart services.
|
|
|
|
|
/opt/wrolpi/repair.sh
|