mirror of
https://github.com/YunoHost-Apps/cachet_ynh.git
synced 2024-09-03 18:16:03 +02:00
Fix
This commit is contained in:
parent
edfb364b99
commit
cf463f2c25
2 changed files with 3 additions and 3 deletions
|
@ -8,4 +8,4 @@ INSERT INTO `settings` (`id`, `name`, `value`) VALUES
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO `users` (`id`, `username`, `password`, `email`, `api_key`, `active`, `level`) VALUES
|
INSERT INTO `users` (`id`, `username`, `password`, `email`, `api_key`, `active`, `level`) VALUES
|
||||||
(1, '__USER__', '__PASSWORD_HASH__', '__EMAIL__', '', 1, 1);
|
(1, '__ADMIN__', '__PASSWORD_HASH__', '__EMAIL__', '', 1, 1);
|
||||||
|
|
|
@ -137,14 +137,14 @@ exec_artisan "cachet:install"
|
||||||
# Populate MySQL database
|
# Populate MySQL database
|
||||||
sql_conf="../conf/init-mysql.sql"
|
sql_conf="../conf/init-mysql.sql"
|
||||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain$path_url" --target_file="$sql_conf"
|
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain$path_url" --target_file="$sql_conf"
|
||||||
ynh_replace_string --match_string="__USER__" --replace_string="$admin" --target_file="$sql_conf"
|
ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$sql_conf"
|
||||||
ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$sql_conf"
|
ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$sql_conf"
|
||||||
|
|
||||||
password_hash="$(cd $final_path ; php$YNH_PHP_VERSION artisan tinker -q --no-ansi <<< "echo Hash::make('$admin_password');" |head -n 1)"
|
password_hash="$(cd $final_path ; php$YNH_PHP_VERSION artisan tinker -q --no-ansi <<< "echo Hash::make('$admin_password');" |head -n 1)"
|
||||||
password_pash="${password_hash::-1}" # Remove last character
|
password_pash="${password_hash::-1}" # Remove last character
|
||||||
ynh_replace_string --match_string="__PASSWORD_HASH__" --replace_string="$password_pash" --target_file="$sql_conf"
|
ynh_replace_string --match_string="__PASSWORD_HASH__" --replace_string="$password_pash" --target_file="$sql_conf"
|
||||||
|
|
||||||
ynh_replace_string --match_string="__EMAIL__" --replace_string="$admin_mail" --target_file="$sql_conf"
|
ynh_replace_string --match_string="__EMAIL__" --replace_string="$email" --target_file="$sql_conf"
|
||||||
|
|
||||||
ynh_mysql_connect_as --user="$db_name" --password="$db_pwd" --database="$db_name" \
|
ynh_mysql_connect_as --user="$db_name" --password="$db_pwd" --database="$db_name" \
|
||||||
< "$sql_conf"
|
< "$sql_conf"
|
||||||
|
|
Loading…
Add table
Reference in a new issue