mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[enh] Add helpers to set and get an application setting
This commit is contained in:
parent
6840d120c0
commit
e5c467ad26
1 changed files with 18 additions and 0 deletions
18
data/apps/helpers.d/setting
Normal file
18
data/apps/helpers.d/setting
Normal file
|
@ -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"
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue