mirror of
https://github.com/YunoHost-Apps/dendrite_ynh.git
synced 2024-09-03 18:25:58 +02:00
41 lines
1.4 KiB
Bash
41 lines
1.4 KiB
Bash
#!/bin/bash
|
|
|
|
#=================================================
|
|
# GENERIC STARTING
|
|
#=================================================
|
|
# IMPORT GENERIC HELPERS
|
|
#=================================================
|
|
|
|
source _common.sh
|
|
source /usr/share/yunohost/helpers
|
|
|
|
# Stop script if errors
|
|
ynh_abort_if_errors
|
|
|
|
get_registration_disabled() {
|
|
registration_disabled=$(ynh_app_setting_get --app $app --key registration_disabled)
|
|
echo "${registration_disabled}"
|
|
}
|
|
|
|
set__registration_disabled() {
|
|
if [ "$registration_disabled" -eq "1" ]
|
|
then
|
|
really_enable_open_registration=""
|
|
else
|
|
really_enable_open_registration="--really-enable-open-registration"
|
|
fi
|
|
|
|
ynh_write_var_in_file --file=$install_dir/dendrite.yaml --key=registration_disabled --value="${registration_disabled}"
|
|
domain=$(ynh_app_setting_get --app $app --key domain)
|
|
port_tls=$(ynh_app_setting_get --app $app --key port_tls)
|
|
port=$(ynh_app_setting_get --app $app --key port)
|
|
psql_version=$(ynh_app_setting_get --app $app --key psql_version)
|
|
ynh_add_systemd_config
|
|
ynh_systemd_action --service_name=$app --action="restart" --line_match="Starting external listener" --log_path="systemd"
|
|
ynh_app_setting_set --app=$app --key=registration_disabled --value=$registration_disabled
|
|
}
|
|
#=================================================
|
|
# GENERIC FINALIZATION
|
|
#=================================================
|
|
|
|
ynh_app_config_run $1
|