1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ulogger_ynh.git synced 2024-10-01 13:34:45 +02:00
This commit is contained in:
ericgaspar 2021-02-07 12:01:38 +01:00
parent c4f05d4202
commit 74d7aa8c5c
No known key found for this signature in database
GPG key ID: 574F281483054D44
2 changed files with 6 additions and 6 deletions

View file

@ -1,2 +1,2 @@
INSERT INTO `users` (`id`, `login`, `password`) VALUES (NULL, '__ADMIN__', '__ADMIN_PWD__');

View file

@ -41,9 +41,7 @@ final_path=/var/www/$app
test ! -e "$final_path" || ynh_die "This path already contains a folder"
# Register (book) web path
ynh_webpath_register $app $domain $path_url
admin_pwd=$(openssl passwd -1 -salt xyz $password)
ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
#=================================================
# STORE SETTINGS FROM MANIFEST
@ -119,9 +117,11 @@ ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --ta
ynh_replace_string "^\$enabled = false;" "\$enabled = true;" "$final_path/scripts/setup.php"
admin_pwd=$(openssl passwd -1 -salt xyz $password)
# Replace variables in SQL scripts
ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" ../conf/admin.sql
ynh_replace_string --match_string="__ADMIN_PWD__" --replace_string="$admin_pwd" ../conf/admin.sql
ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="../conf/admin.sql"
ynh_replace_string --match_string="__ADMIN_PWD__" --replace_string="$admin_pwd" --target_file="../conf/admin.sql"
#=================================================
# SETUP APPLICATION WITH CURL