mirror of
https://github.com/YunoHost-Apps/leed_ynh.git
synced 2024-09-03 19:26:32 +02:00
Remove password from log
This commit is contained in:
parent
7a3fc9ce03
commit
379cfa3446
2 changed files with 22 additions and 1 deletions
|
@ -343,6 +343,23 @@ ynh_exec_fully_quiet () {
|
|||
eval $@ > /dev/null 2>&1
|
||||
}
|
||||
|
||||
# Remove any logs for all the following commands.
|
||||
#
|
||||
# usage: ynh_print_OFF
|
||||
# WARNING: You should be careful with this helper, and never forgot to use ynh_print_ON as soon as possible to restore the logging.
|
||||
ynh_print_OFF () {
|
||||
set +x
|
||||
}
|
||||
|
||||
# Restore the logging after ynh_print_OFF
|
||||
#
|
||||
# usage: ynh_print_ON
|
||||
ynh_print_ON () {
|
||||
set -x
|
||||
# Print an echo only for the log, to be able to know that ynh_print_ON has been called.
|
||||
echo ynh_print_ON > /dev/null
|
||||
}
|
||||
|
||||
#=================================================
|
||||
|
||||
# Install or update the main directory yunohost.multimedia
|
||||
|
|
|
@ -22,7 +22,7 @@ ynh_abort_if_errors # Active trap pour arrêter le script si une erreur est dét
|
|||
domain=$YNH_APP_ARG_DOMAIN
|
||||
path_url=$YNH_APP_ARG_PATH
|
||||
admin=$YNH_APP_ARG_ADMIN
|
||||
user_pwd=$YNH_APP_ARG_PASSWORD
|
||||
ynh_print_OFF; user_pwd=$YNH_APP_ARG_PASSWORD; ynh_print_ON
|
||||
language=$YNH_APP_ARG_LANGUAGE
|
||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||
|
||||
|
@ -103,7 +103,9 @@ yunohost app ssowatconf
|
|||
systemctl reload nginx
|
||||
|
||||
# Leed installation via curl
|
||||
ynh_print_OFF
|
||||
ynh_local_curl "/install.php?installButton" "install_changeLngLeed=$language" "root=$domain$path_url" "mysqlHost=localhost" "mysqlLogin=$db_name" "mysqlMdp=$db_pwd" "mysqlBase=$db_name" "mysqlPrefix=leed_" "login=$admin" "password=$user_pwd"
|
||||
ynh_print_ON
|
||||
|
||||
#=================================================
|
||||
# RETRIEVE SYNCHRONISATION CODE
|
||||
|
@ -163,8 +165,10 @@ systemctl reload nginx
|
|||
# SEND A README FOR THE ADMIN
|
||||
#=================================================
|
||||
|
||||
ynh_print_OFF
|
||||
message="Please take note of your password for this application: '$user_pwd'.
|
||||
|
||||
If you facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/leed_ynh"
|
||||
|
||||
ynh_send_readme_to_admin "$message" "$admin"
|
||||
ynh_print_ON
|
||||
|
|
Loading…
Add table
Reference in a new issue