mirror of
https://github.com/YunoHost-Apps/pgadmin_ynh.git
synced 2024-09-03 19:56:38 +02:00
Get email from user info
This commit is contained in:
parent
8cfaa20d9e
commit
7575a3e11e
1 changed files with 8 additions and 1 deletions
|
@ -29,6 +29,13 @@ ynh_webpath_available $domain $path_url
|
||||||
# Register (book) web path
|
# Register (book) web path
|
||||||
ynh_webpath_register $app $domain $path_url
|
ynh_webpath_register $app $domain $path_url
|
||||||
|
|
||||||
|
# Get user email and check that the user exist
|
||||||
|
email=$(ynh_user_get_info $admin 'mail')
|
||||||
|
if [[ -z $email ]]
|
||||||
|
then
|
||||||
|
ynh_die "Can't get user email, check that the user exist or that the user have an email"
|
||||||
|
fi
|
||||||
|
|
||||||
# Build user password
|
# Build user password
|
||||||
db_pwd=$(ynh_string_random 30)
|
db_pwd=$(ynh_string_random 30)
|
||||||
|
|
||||||
|
@ -75,7 +82,7 @@ chmod +x ../conf/setup.exp
|
||||||
PS1=""
|
PS1=""
|
||||||
source $final_path/bin/activate
|
source $final_path/bin/activate
|
||||||
ynh_replace_special_string "__ADMIN_PASSWORD__" "$admin_pwd" "../conf/setup.exp"
|
ynh_replace_special_string "__ADMIN_PASSWORD__" "$admin_pwd" "../conf/setup.exp"
|
||||||
../conf/setup.exp "$final_path/bin/python2.7" "$final_path/lib/python2.7/site-packages/pgadmin4/setup.py" "$admin@$domain"
|
../conf/setup.exp "$final_path/bin/python2.7" "$final_path/lib/python2.7/site-packages/pgadmin4/setup.py" "$email"
|
||||||
|
|
||||||
# POPULATE THE DATABASE
|
# POPULATE THE DATABASE
|
||||||
ynh_psql_test_if_first_run
|
ynh_psql_test_if_first_run
|
||||||
|
|
Loading…
Reference in a new issue