mirror of
https://github.com/YunoHost-Apps/gitlab_ynh.git
synced 2024-09-03 18:36:35 +02:00
40 lines
No EOL
1.2 KiB
Bash
40 lines
No EOL
1.2 KiB
Bash
#!/bin/bash
|
|
|
|
#=================================================
|
|
# GENERIC STARTING
|
|
#=================================================
|
|
# IMPORT GENERIC HELPERS
|
|
#=================================================
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
ynh_abort_if_errors
|
|
|
|
#=================================================
|
|
# RETRIEVE ARGUMENTS
|
|
#=================================================
|
|
|
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
|
|
|
#=================================================
|
|
# SPECIFIC GETTERS FOR TOML SHORT KEY
|
|
#=================================================
|
|
|
|
#=================================================
|
|
# SPECIFIC SETTERS FOR TOML SHORT KEYS
|
|
#=================================================
|
|
|
|
set__use_web_account() {
|
|
if [ -n "${use_web_account}" ]
|
|
then
|
|
echo "ApplicationSetting.last.update(password_authentication_enabled_for_web: $use_web_account, signup_enabled: $use_web_account)" | gitlab-rails console
|
|
|
|
# Update the config of the app
|
|
ynh_app_setting_set --app=$app --key=use_web_account --value=$use_web_account
|
|
fi
|
|
}
|
|
|
|
#=================================================
|
|
# GENERIC FINALIZATION
|
|
#=================================================
|
|
ynh_app_config_run $1 |