From e2f1ae5ab429ad2de54c5c5527307464edbe0f5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 26 Feb 2024 17:41:47 +0100 Subject: [PATCH] Fix if_botuser --- scripts/install | 2 +- scripts/upgrade | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 96d76ff..93245d5 100755 --- a/scripts/install +++ b/scripts/install @@ -17,7 +17,7 @@ source /usr/share/yunohost/helpers bot_synapse_adm=true encryption=false -if [[ -z "${botusers}" ]] || [ "$botusers" == "admin" ]; then +if [[ -z "$botusers" ]] || [ "$botusers" == "admin" ]; then if_botusers="# " else if_botusers="" diff --git a/scripts/upgrade b/scripts/upgrade index 6af3ff0..ff3b0da 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -49,6 +49,12 @@ chown -R "$app:$app" "$install_dir" #================================================= ynh_script_progression --message="Updating a configuration file..." --weight=2 +if [[ -z "$botusers" ]] || [ "$botusers" == "admin" ]; then + if_botusers="# " +else + if_botusers="" +fi + ynh_add_config --template="config.yaml" --destination="$install_dir/config.yaml" chmod 400 "$install_dir/config.yaml"