setup_device.sh

This commit is contained in:
Mike Heier 2024-02-27 09:48:16 -05:00
parent 6e880b2364
commit ff609a10fe
5 changed files with 18 additions and 14 deletions

View File

@ -1,4 +1,5 @@
#!/bin/bash
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p bash
# DEPRECATED DEVICES: raspi3

View File

@ -158,12 +158,12 @@ if ! skip_base_upgrades ; then
if [[ -x /usr/local/bin/glances || -x /usr/bin/glances ]]; then
echo "Upgrade Glances and dependencies"
# Upgrade libs
pip install --upgrade $DEPS
pip install --upgrade glances
pip-install --upgrade $DEPS
pip-install --upgrade glances
else
echo "Install Glances"
pip install $DEPS
pip install glances
pip-install $DEPS
pip-install glances
fi
# Install Openbox GUI

View File

@ -56,7 +56,7 @@ mkdir -p /home/admin/upgrade_logs/
mkdir -p /opt/upgrade
cd /opt/upgrade
if [ ! -d /opt/upgrade/.git ]; then
git clone http://git.heier.io/michael.heier/mynode .
git clone https://git.heier.io/michael.heier/mynode .
git fetch --tags
else
git fetch

View File

@ -19,9 +19,9 @@ fi
# Install deps
virtualenv -p python3 .venv
.venv/bin/pip install -r requirements.txt
.venv/bin/pip install whitenoise
.venv/bin/pip install supervisor
.venv/bin/pip-install -r requirements.txt
.venv/bin/pip-install whitenoise
.venv/bin/pip-install supervisor
# Patch to store file locally
sed -i 's|/usr/local/etc/supervisord.conf|/opt/mynode/lndg/.venv/supervisord.conf|g' initialize.py

View File

@ -304,20 +304,23 @@ apt-get install -y python3-pip python3-dev python3-docker gcc lm-sensors wireles
# Glances issue #922: Do not install PySensors (SENSORS)
DEPS="setuptools glances[action,batinfo,browser,cpuinfo,docker,export,folders,gpu,graph,ip,raid,snmp,web,wifi]"
# Alias pip to break system???
alias pip-install=pip install --break-system-packages
# Install libs
# do_with_root pip install --upgrade pip
pip install $DEPS
# do_with_root pip-install --upgrade pip
pip-install $DEPS
# Install or upgrade Glances from the Pipy repository
if [[ -x /usr/local/bin/glances || -x /usr/bin/glances ]]; then
echo "Upgrade Glances and dependencies"
# Upgrade libs
pip install --upgrade $DEPS
pip install --upgrade glances
pip-install --upgrade $DEPS
pip-install --upgrade glances
else
echo "Install Glances"
# Install Glances
pip install glances
pip-install glances
fi
# Make sure some software is removed