1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dendrite_ynh.git synced 2024-09-03 18:25:58 +02:00

ynh_systemd_action

This commit is contained in:
Gredin67 2023-07-31 16:42:52 +02:00 committed by GitHub
parent 7685f190c1
commit dfbdfca77e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View file

@ -173,7 +173,7 @@ client_api:
# Whether to require reCAPTCHA for registration. If you have enabled registration # Whether to require reCAPTCHA for registration. If you have enabled registration
# then this is HIGHLY RECOMMENDED to reduce the risk of your homeserver being used # then this is HIGHLY RECOMMENDED to reduce the risk of your homeserver being used
# for coordinated spam attacks. # for coordinated spam attacks.
enable_registration_captcha: __ENABLE_REGISTRATION_CAPTCHA enable_registration_captcha: __ENABLE_REGISTRATION_CAPTCHA__
# Settings for ReCAPTCHA. # Settings for ReCAPTCHA.
recaptcha_public_key: "" recaptcha_public_key: ""

View file

@ -14,6 +14,7 @@ ynh_abort_if_errors
get_registration_disabled() { get_registration_disabled() {
registration_disabled=$(ynh_app_setting_get --app $app --key registration_disabled) registration_disabled=$(ynh_app_setting_get --app $app --key registration_disabled)
domain=$(ynh_app_setting_get --app $app --key domain)
echo "${registration_disabled}" echo "${registration_disabled}"
} }
@ -27,6 +28,7 @@ set__registration_disabled() {
ynh_write_var_in_file --file=$install_dir/dendrite.yaml --key=registration_disabled --value="${registration_disabled}" ynh_write_var_in_file --file=$install_dir/dendrite.yaml --key=registration_disabled --value="${registration_disabled}"
ynh_add_systemd_config 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 ynh_app_setting_set --app=$app --key=registration_disabled --value=$registration_disabled
} }
#================================================= #=================================================

View file

@ -52,7 +52,6 @@ enable_registration_captcha=$(ynh_app_setting_get --app=$app --key=enable_regist
#================================================= #=================================================
domain=$(ynh_app_setting_get --app=$app --key=domain) domain=$(ynh_app_setting_get --app=$app --key=domain)
ynh_app_setting_delete --app=$app --key=domain
# Define $server_name if not already defined # Define $server_name if not already defined
if [ -z $server_name ]; then if [ -z $server_name ]; then