mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-03-08 13:19:05 +00:00
Update homeassistant-core.sh
This commit is contained in:
parent
01e8f413ea
commit
fe85758520
@ -57,6 +57,29 @@ function update_script() {
|
||||
systemctl stop homeassistant
|
||||
msg_ok "Stopped Home Assistant"
|
||||
|
||||
version=$(python3 --version 2>&1)
|
||||
|
||||
# Extract the version number
|
||||
if [[ $version == "Python 3.13"* ]]; then
|
||||
echo "Python 3.13 is installed."
|
||||
else
|
||||
msg_info "Update Python"
|
||||
$STD apt-get update
|
||||
$STD rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
$STD apt-get remove --purge -y python3.* python3.*-dev python3.*-venv
|
||||
|
||||
$STD apt-get install -y \
|
||||
python3.13 \
|
||||
python3-pip \
|
||||
python3.13-dev \
|
||||
python3.13-venv
|
||||
|
||||
ln -sf /usr/bin/python3.13 /usr/bin/python3
|
||||
mdg_ok "Updated Python"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
msg_info "Updating Home Assistant"
|
||||
source /srv/homeassistant/bin/activate
|
||||
$STD pip install ${BR}--upgrade homeassistant
|
||||
@ -131,4 +154,4 @@ description
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8123${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8123${CL}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user