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 2023-11-08 09:30:30 +01:00
parent 6a23c7d09f
commit 2d15b132c7
3 changed files with 6 additions and 6 deletions

View file

@ -1,3 +1,3 @@
INSERT INTO `wt_user` (`user_id`, `user_name`, `real_name`, `email`, `password`) VALUES (NULL, '__USER_NAME__', '__NAME__', '__USER_EMAIL__', '__ADMIN_PASSWORD__'); INSERT INTO `wt_user` (`user_id`, `user_name`, `real_name`, `email`, `password`) VALUES (NULL, '__USER_NAME__', '__NAME__', '__USER_EMAIL__', '__ADMIN_PASSWORD_HASHED__');
INSERT INTO `wt_user_setting` (`user_id`, `setting_name`, `setting_value`) VALUES ('1', 'canadmin', '1'), ('1', 'verified', '1'), ('1', 'verified_by_admin', '1'); 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

@ -45,17 +45,17 @@ ynh_script_progression --message="Configuring NGINX web server..."
ynh_add_nginx_config ynh_add_nginx_config
# Create a dedicated PHP-FPM config # Create a dedicated PHP-FPM config
ynh_add_fpm_config --usage=low --footprint=low ynh_add_fpm_config
#================================================= #=================================================
# MODIFY A CONFIG FILE # MODIFY A CONFIG FILE
#================================================= #=================================================
# Adding the details of the database to the config file # Adding the details of the database to the config file
ynh_add_config --template="../conf/config.ini.php" --destination="$install_dir/data/config.ini.php" ynh_add_config --template="config.ini.php" --destination="$install_dir/data/config.ini.php"
# Load initial SQL into the new database # Load initial SQL into the new database
ynh_mysql_connect_as "$db_name" "$db_pwd" "$db_name" < "../conf/sql/webtrees.sql" ynh_mysql_connect_as --user="$db_name" "--password=$db_pwd" < "../conf/sql/webtrees.sql"
# Replace variables in sql scripts # Replace variables in sql scripts
ynh_replace_string --match_string="__USER_NAME__" --replace_string="$admin_username" --target_file="../conf/sql/admin.sql" ynh_replace_string --match_string="__USER_NAME__" --replace_string="$admin_username" --target_file="../conf/sql/admin.sql"
@ -63,7 +63,7 @@ ynh_replace_string --match_string="__NAME__" --replace_string="$admin_name" --ta
ynh_replace_string --match_string="__USER_EMAIL__" --replace_string="$admin_email" --target_file="../conf/sql/admin.sql" ynh_replace_string --match_string="__USER_EMAIL__" --replace_string="$admin_email" --target_file="../conf/sql/admin.sql"
ynh_replace_string --match_string="__ADMIN_PASSWORD_HASHED__" --replace_string="$admin_password_hashed" --target_file="../conf/sql/admin.sql" ynh_replace_string --match_string="__ADMIN_PASSWORD_HASHED__" --replace_string="$admin_password_hashed" --target_file="../conf/sql/admin.sql"
ynh_mysql_connect_as "$db_name" "$db_pwd" "$db_name" < "../conf/sql/admin.sql" ynh_mysql_connect_as --user="$db_name" "--password=$db_pwd" < "../conf/sql/admin.sql"
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT

View file

@ -52,7 +52,7 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..."
ynh_add_nginx_config ynh_add_nginx_config
# Create a dedicated PHP-FPM config # Create a dedicated PHP-FPM config
ynh_add_fpm_config --usage=low --footprint=low ynh_add_fpm_config
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT