diff --git a/check_process b/check_process index 8c8a43a..5e5eb9c 100644 --- a/check_process +++ b/check_process @@ -17,7 +17,7 @@ multi_instance=0 port_already_use=1 change_url=1 - actions=1 + actions=0 config_panel=0 ;;; Options Notification=all diff --git a/conf/homeassistant_conf_files/bin/ynh_ldap-auth.sh b/conf/homeassistant_conf_files/bin/ynh_ldap-auth.sh index f410bd2..f4b9f5a 100755 --- a/conf/homeassistant_conf_files/bin/ynh_ldap-auth.sh +++ b/conf/homeassistant_conf_files/bin/ynh_ldap-auth.sh @@ -48,7 +48,7 @@ log() { # Check permission of ynh user. ynh_user_app_permission() { - access=$(cat "/etc/ssowat/conf.json" | jq 'def IN(s): . as $in | first(if (s == $in) then true else empty end) ; .permissions["homeassistant.main"].users as $f | '\"$username\"' | IN($f[])') + access=$(cat "/etc/ssowat/conf.json" | jq ".permissions.\"homeassistant.main\".users | index(\"$username\")") [ ! -z "$access" ] && return 1 return 0 } diff --git a/scripts/backup b/scripts/backup index 6b8d835..473b1b1 100644 --- a/scripts/backup +++ b/scripts/backup @@ -16,17 +16,17 @@ domain=$(ynh_app_setting_get --app="$app" --key=domain) final_path="/opt/yunohost/$app" home_path="/home/$app" -ynh_script_progression --message="Storing the python version in settings..." +ynh_print_info --message="Storing the python version in settings..." # store python version python=$(cat "$final_path/bin/python3" --version | cut -d ' ' -f 2) ynh_app_setting_set --app="$app" --key=python --value="$python" # backup source & conf files -ynh_script_progression --message="Backuping the app, datas & ystem files..." +ynh_print_info --message="Declaring files to be backed up..." ynh_backup --src_path="$final_path" ynh_backup --src_path="$home_path" ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup --src_path="/etc/sudoers.d/$app" ynh_backup --src_path="/etc/systemd/system/$app@$app.service" -ynh_script_progression --message="Backup of $app completed" --last +ynh_print_info --message="Backup of $app completed" diff --git a/scripts/restore b/scripts/restore index 8c2035c..b59f50f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -66,7 +66,7 @@ ynh_systemd_action --service_name="$app@$app" --action=start --line_match="Home # remove --verbose from service and restart ynh_replace_string --match_string=" --verbose" --replace_string="" --target_file="/etc/systemd/system/$app@$app.service" systemctl daemon-reload -ynh_systemd_action --service_name="$app@$app" --action=restart +ynh_systemd_action --service_name="$app@$app" --action=restart --line_match="Started Home Assistant" --log_path="systemd" --timeout=3600 ynh_script_progression --message="Restoring nginx web server..." ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"