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

Set email var

This commit is contained in:
ericgaspar 2021-06-03 18:51:24 +02:00
parent 6e514fd5f1
commit d22d39c802
No known key found for this signature in database
GPG key ID: 574F281483054D44
3 changed files with 6 additions and 6 deletions

View file

@ -119,7 +119,7 @@ cdn_url =
cdn_origin_hostname =
# comma delimited list of emails that have developer level access
developer_emails = __ADMIN_MAIL__
developer_emails = __EMAIL__
# redis server address
redis_host = localhost

View file

@ -28,7 +28,7 @@ domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH
admin=$YNH_APP_ARG_ADMIN
is_public=$YNH_APP_ARG_IS_PUBLIC
admin_mail=$(ynh_user_get_info --username=$admin --key=mail)
email=$(ynh_user_get_info --username=$admin --key=mail)
app=$YNH_APP_INSTANCE_NAME
@ -54,7 +54,7 @@ ynh_script_progression --message="Storing installation settings..."
ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=admin --value=$admin
ynh_app_setting_set --app=$app --key=admin_mail --value=$admin_mail
ynh_app_setting_set --app=$app --key=email --value=$email
#=================================================
# STANDARD MODIFICATIONS
@ -209,7 +209,7 @@ ynh_script_progression --message="Populating the database..."
#Set default data (especially to have correct image URLs for subfolder install)
ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name <<< "INSERT INTO site_settings (name, data_type, value, created_at, updated_at) VALUES ('title', 1, 'YunoHost Forum', 'NOW()', 'NOW()');
INSERT INTO site_settings (name, data_type, value, created_at, updated_at) VALUES ('site_description', 1, 'YunoHost Forum', 'NOW()', 'NOW()');
INSERT INTO site_settings (name, data_type, value, created_at, updated_at) VALUES ('contact_email', 14, '$admin_mail', 'NOW()', 'NOW()');
INSERT INTO site_settings (name, data_type, value, created_at, updated_at) VALUES ('contact_email', 14, '$email', 'NOW()', 'NOW()');
INSERT INTO site_settings (name, data_type, value, created_at, updated_at) VALUES ('contact_url', 1, '$domain$path_url', 'NOW()', 'NOW()');
INSERT INTO site_settings (name, data_type, value, created_at, updated_at) VALUES ('site_contact_username', 15, '$admin', 'NOW()', 'NOW()');
INSERT INTO site_settings (name, data_type, value, created_at, updated_at) VALUES ('logo_url', 1, '${path_url%/}/images/d-logo-sketch.png', 'NOW()', 'NOW()');
@ -228,7 +228,7 @@ ynh_script_progression --message="Creating Discourse admin user..."
# Create a random password
admin_pwd=$(ynh_string_random)
$rake_exec admin:create <<< "$admin_mail
$rake_exec admin:create <<< "$email
$admin_pwd
$admin_pwd
y

View file

@ -24,7 +24,7 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
redis_db=$(ynh_app_setting_get --app=$app --key=redis_db)
unicorn_workers=$(ynh_app_setting_get --app=$app --key=unicorn_workers)
admin_mail=$(ynh_app_setting_get --app=$app --key=admin_mail)
email=$(ynh_app_setting_get --app=$app --key=email)
# Check memory requirements
#check_memory_requirements_upgrade