mirror of
https://github.com/YunoHost-Apps/question2answer_ynh.git
synced 2024-09-03 20:16:07 +02:00
fix
This commit is contained in:
parent
d509a80c83
commit
5d4a5c67b0
2 changed files with 6 additions and 6 deletions
|
@ -27,6 +27,6 @@ INSERT INTO `qa_options` (`title`, `content`) VALUES
|
|||
|
||||
UPDATE `qa_users` SET `sessionsource` = 'ldap';
|
||||
INSERT INTO `qa_userlogins` (`userid`, `source`, `identifier`, `identifiermd5`) VALUES
|
||||
((SELECT userid FROM `qa_users` WHERE `handle` = '__ADMIN__'), 'ldap', '__ADMIN_EMAIL__', UNHEX(MD5('__ADMIN_EMAIL__')));
|
||||
((SELECT userid FROM `qa_users` WHERE `handle` = '__ADMIN__'), 'ldap', '__EMAIL__', UNHEX(MD5('__EMAIL__')));
|
||||
|
||||
COMMIT;
|
||||
|
|
|
@ -73,6 +73,9 @@ ynh_add_config --template="../conf/qa-config.php" --destination="$install_dir/qa
|
|||
chmod 400 "$install_dir/qa-config.php"
|
||||
chown $app:$app "$install_dir/qa-config.php"
|
||||
|
||||
# Calculate and store the config file checksum into the app settings
|
||||
ynh_store_file_checksum --file="$install_dir/qa-config.php"
|
||||
|
||||
#=================================================
|
||||
# SETUP APPLICATION WITH CURL
|
||||
#=================================================
|
||||
|
@ -101,12 +104,9 @@ ynh_local_curl_csrf "/index.php?qa=admin&qa_1=general"\
|
|||
"has_js=0"
|
||||
|
||||
ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="../conf/ldap.sql"
|
||||
ynh_replace_string --match_string="__ADMIN_EMAIL__" --replace_string="$email" --target_file="../conf/ldap.sql"
|
||||
mysql -u $db_user -p${db_pwd} $db_name < ../conf/ldap.sql
|
||||
ynh_replace_string --match_string="__EMAIL__" --replace_string="$email" --target_file="../conf/ldap.sql"
|
||||
|
||||
# Calculate and store the config file checksum into the app settings
|
||||
ynh_store_file_checksum --file="$install_dir/qa-config.php"
|
||||
ynh_store_file_checksum --file="$install_dir/.htaccess"
|
||||
ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" < ../conf/ldap.sql
|
||||
|
||||
#=================================================
|
||||
# SECURE FILES AND DIRECTORIES
|
||||
|
|
Loading…
Reference in a new issue