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

Fix variables not initialized

This commit is contained in:
yalh76 2021-08-16 20:47:30 +02:00
parent 15e4398677
commit f2ec7b24a1

View file

@ -23,6 +23,9 @@ ynh_abort_if_errors
domain=$YNH_APP_ARG_DOMAIN domain=$YNH_APP_ARG_DOMAIN
admin=$YNH_APP_ARG_ADMIN admin=$YNH_APP_ARG_ADMIN
shared_secret="$(ynh_string_random 25)"
admin_jid="${admin}@$app.${domain}"
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
#================================================= #=================================================
@ -42,6 +45,8 @@ ynh_script_progression --message="Storing installation settings..."
ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=admin --value=$admin ynh_app_setting_set --app=$app --key=admin --value=$admin
ynh_app_setting_set --app=$app --key=shared_secret --value=$shared_secret
ynh_app_setting_set --app=$app --key=admin_jid --value=$admin_jid
#================================================= #=================================================
# STANDARD MODIFICATIONS # STANDARD MODIFICATIONS
@ -90,14 +95,6 @@ chown -R _biboumi:_biboumi "/var/lib/$app"
#================================================= #=================================================
ynh_script_progression --message="Adding a configuration file..." ynh_script_progression --message="Adding a configuration file..."
# Create a secret password that will be shared by metronome and biboumi.
shared_secret="$(ynh_string_random 25)"
ynh_app_setting_set --app=$app --key=shared_secret --value=$shared_secret
# Biboumi needs at least one admin JID.
admin_jid="${admin}@$app.${domain}"
ynh_app_setting_set --app=$app --key=admin_jid --value=$admin_jid
ynh_add_config --template="../conf/biboumi.cfg" --destination="/etc/$app/$app.cfg" ynh_add_config --template="../conf/biboumi.cfg" --destination="/etc/$app/$app.cfg"
chown -R _biboumi:_biboumi "/etc/$app/$app.cfg" chown -R _biboumi:_biboumi "/etc/$app/$app.cfg"