From e5c467ad266e11a8691090dcee220e89b147aea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Lebleu?= Date: Thu, 24 Dec 2015 10:38:10 +0100 Subject: [PATCH] [enh] Add helpers to set and get an application setting --- data/apps/helpers.d/setting | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 data/apps/helpers.d/setting diff --git a/data/apps/helpers.d/setting b/data/apps/helpers.d/setting new file mode 100644 index 000000000..14d47c133 --- /dev/null +++ b/data/apps/helpers.d/setting @@ -0,0 +1,18 @@ +# Get an application setting +# +# usage: ynh_app_setting_get app key +# | arg: app - the application id +# | arg: key - the setting to get +ynh_app_setting_get() { + sudo yunohost app setting "$1" "$2" --output-as plain +} + +# Set an application setting +# +# usage: ynh_app_setting_set app key value +# | arg: app - the application id +# | arg: key - the setting name to set +# | arg: value - the setting value to set +ynh_app_setting_set() { + sudo yunohost app setting "$1" "$2" -v "$3" +}