mirror of
https://github.com/tteck/Proxmox.git
synced 2024-12-24 14:01:56 +00:00
Update homeassistant-core-install.sh
This commit is contained in:
parent
7a788da1de
commit
c76e4072da
@ -79,27 +79,48 @@ apt-get update &>/dev/null
|
|||||||
apt-get -y upgrade &>/dev/null
|
apt-get -y upgrade &>/dev/null
|
||||||
msg_ok "Updated Container OS"
|
msg_ok "Updated Container OS"
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies (Patience)"
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
python3 \
|
make \
|
||||||
python3-dev \
|
build-essential \
|
||||||
python3-venv \
|
|
||||||
python3-pip \
|
|
||||||
libffi-dev \
|
|
||||||
libssl-dev \
|
|
||||||
libjpeg-dev \
|
libjpeg-dev \
|
||||||
libpcap-dev \
|
libpcap-dev \
|
||||||
|
libssl-dev \
|
||||||
zlib1g-dev \
|
zlib1g-dev \
|
||||||
|
libbz2-dev \
|
||||||
|
libreadline-dev \
|
||||||
|
libsqlite3-dev \
|
||||||
autoconf \
|
autoconf \
|
||||||
build-essential \
|
git \
|
||||||
|
curl \
|
||||||
|
sudo \
|
||||||
|
llvm \
|
||||||
|
libncursesw5-dev \
|
||||||
|
xz-utils \
|
||||||
|
tk-dev \
|
||||||
|
libxml2-dev \
|
||||||
|
libxmlsec1-dev \
|
||||||
|
libffi-dev \
|
||||||
libopenjp2-7 \
|
libopenjp2-7 \
|
||||||
libtiff5 \
|
libtiff5 \
|
||||||
libturbojpeg0-dev \
|
libturbojpeg0-dev \
|
||||||
tzdata \
|
liblzma-dev &>/dev/null
|
||||||
curl \
|
|
||||||
sudo &>/dev/null
|
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Installing pyenv"
|
||||||
|
git clone https://github.com/pyenv/pyenv.git ~/.pyenv &>/dev/null
|
||||||
|
set +e
|
||||||
|
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
|
||||||
|
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
|
||||||
|
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init --path)"\nfi' >> ~/.bashrc
|
||||||
|
msg_ok "Installed pyenv"
|
||||||
|
. ~/.bashrc
|
||||||
|
set -e
|
||||||
|
msg_info "Installing Python 3.10.8"
|
||||||
|
pyenv install 3.10.8 &>/dev/null
|
||||||
|
pyenv global 3.10.8
|
||||||
|
msg_ok "Installed Python 3.10.8"
|
||||||
|
|
||||||
msg_info "Installing Home Assistant-Core"
|
msg_info "Installing Home Assistant-Core"
|
||||||
mkdir /srv/homeassistant
|
mkdir /srv/homeassistant
|
||||||
cd /srv/homeassistant
|
cd /srv/homeassistant
|
||||||
@ -107,14 +128,10 @@ python3 -m venv .
|
|||||||
source bin/activate
|
source bin/activate
|
||||||
python3 -m pip install wheel &>/dev/null
|
python3 -m pip install wheel &>/dev/null
|
||||||
pip3 install homeassistant &>/dev/null
|
pip3 install homeassistant &>/dev/null
|
||||||
pip3 install Cython &>/dev/null
|
|
||||||
pip3 install python-libpcap &>/dev/null
|
|
||||||
pip3 install psycopg2-binary &>/dev/null
|
|
||||||
msg_ok "Installed Home Assistant-Core"
|
msg_ok "Installed Home Assistant-Core"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
cat <<EOF >/etc/systemd/system/homeassistant.service
|
cat <<EOF >/etc/systemd/system/homeassistant.service
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Home Assistant
|
Description=Home Assistant
|
||||||
After=network-online.target
|
After=network-online.target
|
||||||
|
Loading…
Reference in New Issue
Block a user