bundles/homeassistant: changes for bookworm

This commit is contained in:
Franzi 2023-08-23 17:17:42 +02:00
parent daae710624
commit 10a9e61026
Signed by: kunsi
GPG key ID: 12E3D2136B818350
3 changed files with 14 additions and 9 deletions

View file

@ -8,6 +8,8 @@ User=homeassistant
WorkingDirectory=/var/opt/homeassistant WorkingDirectory=/var/opt/homeassistant
ExecStart=/opt/homeassistant/venv/bin/hass -c "/var/opt/homeassistant" ExecStart=/opt/homeassistant/venv/bin/hass -c "/var/opt/homeassistant"
RestartForceExitStatus=100 RestartForceExitStatus=100
Restart=on-failure
RestartSec=2
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View file

@ -37,6 +37,13 @@ actions = {
'needs': { 'needs': {
'directory:/opt/homeassistant', 'directory:/opt/homeassistant',
'user:homeassistant', 'user:homeassistant',
},
},
'homeassistant_install': {
'command': 'sudo -u homeassistant /opt/homeassistant/venv/bin/pip install homeassistant',
'unless': 'test -f /opt/homeassistant/venv/bin/hass',
'needs': {
'action:homeassistant_create_virtualenv',
'pkg_apt:bluez', 'pkg_apt:bluez',
'pkg_apt:libffi-dev', 'pkg_apt:libffi-dev',
'pkg_apt:libssl-dev', 'pkg_apt:libssl-dev',
@ -45,17 +52,10 @@ actions = {
'pkg_apt:autoconf', 'pkg_apt:autoconf',
'pkg_apt:build-essential', 'pkg_apt:build-essential',
'pkg_apt:libopenjp2-7', 'pkg_apt:libopenjp2-7',
'pkg_apt:libtiff5', 'pkg_apt:libtiff6',
'pkg_apt:libturbojpeg0-dev', 'pkg_apt:libturbojpeg0-dev',
'pkg_apt:tzdata', 'pkg_apt:tzdata',
}, },
},
'homeassistant_install': {
'command': 'sudo -u homeassistant /opt/homeassistant/venv/bin/pip install homeassistant',
'unless': 'test -f /opt/homeassistant/venv/bin/hass',
'needs': {
'action:homeassistant_create_virtualenv',
},
'triggers': { 'triggers': {
'svc_systemd:homeassistant:restart', 'svc_systemd:homeassistant:restart',
}, },

View file

@ -8,7 +8,7 @@ defaults = {
'libjpeg-dev': {}, 'libjpeg-dev': {},
'libopenjp2-7': {}, 'libopenjp2-7': {},
'libssl-dev': {}, 'libssl-dev': {},
'libtiff5': {}, 'libtiff6': {},
'libturbojpeg0-dev': {}, 'libturbojpeg0-dev': {},
'python3-packaging': {}, 'python3-packaging': {},
'tzdata': {}, 'tzdata': {},
@ -22,6 +22,8 @@ defaults = {
}, },
}, },
} }
@metadata_reactor.provides( @metadata_reactor.provides(
'icinga2_api/homeassistant/services', 'icinga2_api/homeassistant/services',
) )
@ -40,6 +42,7 @@ def icinga_check_for_new_release(metadata):
}, },
} }
@metadata_reactor.provides( @metadata_reactor.provides(
'nginx/vhosts/homeassistant', 'nginx/vhosts/homeassistant',
) )