mirror of https://github.com/tteck/Proxmox.git
Compare commits
No commits in common. "6191d8e7921ad30df4c8ae1999cc31b89422d32e" and "f2fe3612249d020737975b023e53b03d1466e718" have entirely different histories.
6191d8e792
...
f2fe361224
|
@ -85,7 +85,7 @@ function update_script() {
|
|||
|
||||
msg_info "Updating Home Assistant"
|
||||
source /srv/homeassistant/bin/activate
|
||||
uv pip install ${BR}--upgrade homeassistant &>/dev/null
|
||||
pip install ${BR}--upgrade homeassistant &>/dev/null
|
||||
msg_ok "Updated Home Assistant"
|
||||
|
||||
msg_info "Starting Home Assistant"
|
||||
|
|
|
@ -14,28 +14,21 @@ network_check
|
|||
update_os
|
||||
|
||||
msg_info "Installing Dependencies (Patience)"
|
||||
$STD apt-get install -y {git,curl,sudo,mc,bluez,libffi-dev,libssl-dev,libjpeg-dev,zlib1g-dev,autoconf,build-essential,libopenjp2-7,libturbojpeg0-dev,ffmpeg,liblapack3,liblapack-dev,dbus-broker,libpcap-dev,libavdevice-dev,libavformat-dev,libavcodec-dev,libavutil-dev,libavfilter-dev,libmariadb-dev-compat,libatlas-base-dev,python3.12-dev}
|
||||
$STD apt-get install -y {git,curl,sudo,mc,bluez,libffi-dev,libssl-dev,libjpeg-dev,zlib1g-dev,autoconf,build-essential,libopenjp2-7,libturbojpeg0-dev,ffmpeg,liblapack3,liblapack-dev,dbus-broker,libpcap-dev,libavdevice-dev,libavformat-dev,libavcodec-dev,libavutil-dev,libavfilter-dev,libmariadb-dev-compat,libatlas-base-dev,python3-pip,python3.12-venv}
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Installing UV"
|
||||
set +u
|
||||
curl -LsSf https://astral.sh/uv/install.sh | sh -s -- -q
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
source ~/.bashrc
|
||||
set -u
|
||||
msg_ok "Installed UV"
|
||||
|
||||
msg_info "Setting up Home Assistant-Core environment"
|
||||
msg_info "Installing Home Assistant-Core"
|
||||
mkdir /srv/homeassistant
|
||||
cd /srv/homeassistant
|
||||
uv venv . &>/dev/null
|
||||
python3 -m venv .
|
||||
source bin/activate
|
||||
msg_ok "Created virtual environment with UV"
|
||||
|
||||
msg_info "Installing Home Assistant-Core and packages"
|
||||
$STD uv pip install webrtcvad wheel homeassistant mysqlclient psycopg2-binary isal
|
||||
$STD pip install webrtcvad
|
||||
$STD python3 -m pip install wheel
|
||||
$STD pip install homeassistant
|
||||
$STD pip install mysqlclient
|
||||
$STD pip install psycopg2-binary
|
||||
mkdir -p /root/.homeassistant
|
||||
msg_ok "Installed Home Assistant-Core and required packages"
|
||||
msg_ok "Installed Home Assistant-Core"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/homeassistant.service
|
||||
|
@ -45,8 +38,7 @@ After=network-online.target
|
|||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/root/.homeassistant
|
||||
Environment="PATH=/srv/homeassistant/bin:/usr/local/bin:/usr/bin:/bin:$HOME/.cargo/bin"
|
||||
ExecStart=/srv/homeassistant/bin/python3 -m homeassistant --config /root/.homeassistant
|
||||
ExecStart=/srv/homeassistant/bin/hass -c "/root/.homeassistant"
|
||||
Restart=always
|
||||
RestartForceExitStatus=100
|
||||
[Install]
|
||||
|
|
Loading…
Reference in New Issue