mirror of
https://github.com/YunoHost-Apps/homeassistant_ynh.git
synced 2024-09-03 19:26:16 +02:00
commit
07a9f67e1b
5 changed files with 16 additions and 7 deletions
|
@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
|||
|
||||
Home automation platform
|
||||
|
||||
**Shipped version:** 2021.12.10~ynh1
|
||||
**Shipped version:** 2022.2.3~ynh1
|
||||
|
||||
**Demo:** https://demo.home-assistant.io
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
|
|||
|
||||
Plateforme domotique
|
||||
|
||||
**Version incluse :** 2021.12.10~ynh1
|
||||
**Version incluse :** 2022.2.3~ynh1
|
||||
|
||||
**Démo :** https://demo.home-assistant.io
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"en": "Home automation platform",
|
||||
"fr": "Plateforme domotique"
|
||||
},
|
||||
"version": "2021.12.10~ynh1",
|
||||
"version": "2022.2.3~ynh1",
|
||||
"url": "https://github.com/home-assistant/home-assistant",
|
||||
"upstream": {
|
||||
"license": "Apache-2.0",
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#=================================================
|
||||
|
||||
# Release to install
|
||||
app_version=2021.12.10
|
||||
app_version=2022.2.3
|
||||
|
||||
# Package dependencies
|
||||
pkg_dependencies="python3 python3-dev python3-venv python3-pip libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential libopenjp2-7 libtiff5 libturbojpeg0 libmariadb-dev libmariadb-dev-compat"
|
||||
|
@ -65,7 +65,7 @@ myynh_install_python () {
|
|||
fi
|
||||
|
||||
# Compare version
|
||||
if [ $(dpkg --compare-versions $py_apt_version ge $python) ]
|
||||
if $(dpkg --compare-versions $py_apt_version ge $python)
|
||||
then
|
||||
# APT >= Required
|
||||
ynh_print_info --message="Using provided python3..."
|
||||
|
@ -74,7 +74,7 @@ myynh_install_python () {
|
|||
|
||||
else
|
||||
# Either python already built or to build
|
||||
if [ $(dpkg --compare-versions $py_built_version ge $python) ]
|
||||
if $(dpkg --compare-versions $py_built_version ge $python)
|
||||
then
|
||||
# Built >= Required
|
||||
ynh_print_info --message="Using already used python3 built version..."
|
||||
|
|
|
@ -113,6 +113,8 @@ ynh_restore_file --origin_path="$(dirname "$log_file")"
|
|||
ynh_script_progression --message="Restoring the systemd configuration..."
|
||||
|
||||
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
|
||||
# add --verbose to track restart
|
||||
sed -i 's/ExecStart=.*/& --verbose/g' "/etc/systemd/system/$app.service"
|
||||
systemctl enable $app.service --quiet
|
||||
|
||||
#=================================================
|
||||
|
@ -140,7 +142,14 @@ yunohost service add $app --description="Home Assistant server" --log="$log_file
|
|||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..."
|
||||
|
||||
ynh_systemd_action --service_name=$app --action=start
|
||||
# start systemd service with --verbose
|
||||
ynh_systemd_action --service_name=$app --action=start --line_match="Home Assistant initialized" --log_path="$log_file" --timeout=3600
|
||||
|
||||
# remove --verbose from service
|
||||
ynh_replace_string --match_string=" --verbose" --replace_string="" --target_file="/etc/systemd/system/$app.service"
|
||||
ynh_store_file_checksum --file="/etc/systemd/system/$app.service"
|
||||
systemctl daemon-reload
|
||||
ynh_systemd_action --service_name=$app --action=restart
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
|
Loading…
Add table
Reference in a new issue