1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/webtrees_ynh.git synced 2024-09-03 18:26:37 +02:00
This commit is contained in:
Éric Gaspar 2022-06-11 16:51:48 +02:00
parent 96380a2a25
commit 175044cadc
No known key found for this signature in database
GPG key ID: 574F281483054D44
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,3 @@
INSERT INTO `wt_user` (`user_id`, `user_name`, `real_name`, `email`, `password`) VALUES (NULL, '__ADMIN__', '__FULLNAME__', '__EMAIL__', '__PASSWORD__');
INSERT INTO `wt_user` (`user_id`, `user_name`, `real_name`, `email`, `password`) VALUES (NULL, '__ADMIN__', '__FULLNAME__', '__EMAIL__', '__SALT_PASSWORD__');
INSERT INTO `wt_user_setting` (`user_id`, `setting_name`, `setting_value`) VALUES ('1', 'canadmin', '1'), ('1', 'verified', '1'), ('1', 'verified_by_admin', '1');

View file

@ -32,6 +32,7 @@ admin=$YNH_APP_ARG_ADMIN
email=$(ynh_user_get_info --username=$admin --key=mail)
fullname=$(ynh_user_get_info --username=$admin --key=fullname)
password=$YNH_APP_ARG_PASSWORD
salt_password=$(openssl passwd -1 -salt xyz $password)
app=$YNH_APP_INSTANCE_NAME
@ -118,6 +119,9 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
# Adding the details of the database to the config file
ynh_add_config --template="../conf/config.ini.php" --destination="$final_path/data/config.ini.php"
chmod 400 "$final_path/data/config.ini.php"
chown $app:$app "$final_path/data/config.ini.php"
# Load initial SQL into the new database
ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < "../conf/sql/webtrees.sql"