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
|