1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/gitlab_ynh.git synced 2024-09-03 18:36:35 +02:00
gitlab_ynh/scripts/config

40 lines
1.2 KiB
Text
Raw Normal View History

2019-04-11 01:12:07 +02:00
#!/bin/bash
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source /usr/share/yunohost/helpers
2021-09-15 15:28:21 +02:00
ynh_abort_if_errors
2019-04-11 01:12:07 +02:00
#=================================================
2021-09-15 15:28:21 +02:00
# RETRIEVE ARGUMENTS
2019-04-11 01:12:07 +02:00
#=================================================
2021-09-15 16:01:49 +02:00
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
2019-04-11 01:12:07 +02:00
#=================================================
2021-09-15 15:28:21 +02:00
# SPECIFIC GETTERS FOR TOML SHORT KEY
2019-04-11 01:12:07 +02:00
#=================================================
#=================================================
2021-09-15 15:28:21 +02:00
# SPECIFIC SETTERS FOR TOML SHORT KEYS
2019-04-11 01:12:07 +02:00
#=================================================
2021-09-15 15:28:21 +02:00
set__use_web_account() {
if [ -n "${use_web_account}" ]
then
echo "ApplicationSetting.last.update_attributes(password_authentication_enabled_for_web: $use_web_account, signup_enabled: $use_web_account)" | gitlab-rails console
2019-04-11 01:12:07 +02:00
2021-09-15 15:28:21 +02:00
# Update the config of the app
ynh_app_setting_set --app=$app --key=use_web_account --value=$use_web_account
fi
2019-04-11 01:12:07 +02:00
}
2021-09-15 16:01:49 +02:00
#=================================================
# GENERIC FINALIZATION
#=================================================
ynh_app_config_run $1