From 79f1e5a2a13c08f22ae43cff182855815f1c0c84 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 7 Jul 2020 17:06:58 +0200 Subject: [PATCH] Fix regression about lock issues by removing the need to call yunohost commands from inside the service script --- conf/ynh-hotspot | 22 ++++++++++++++++++---- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/conf/ynh-hotspot b/conf/ynh-hotspot index de0f730..b3b2a9a 100644 --- a/conf/ynh-hotspot +++ b/conf/ynh-hotspot @@ -256,11 +256,25 @@ ynh_setting_get() { } ynh_setting_set() { - app=${1} - setting=${2} - value=${3} - yunohost app setting "${app}" "${setting}" -v "${value}" + # This is a partial copypasta of the official ynh_app_setting internal helper + # In particular, we do this instead of relying on 'yunohost app setting' for + # performance reasons (it takes a few second to run every yunohost commands) + # and to remove the need for the infamous '--need-lock' option/issue. + + app="$1" key="$2" value="${3:-}" python2.7 - <