1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lstu_ynh.git synced 2024-09-03 19:36:12 +02:00

use ynh_string_random

This commit is contained in:
Kay0u 2019-02-17 22:53:39 +01:00
parent 76b2be857f
commit 3b88fa0de6

View file

@ -77,7 +77,7 @@ fi
if [ -z "$hashed_password" ]; then if [ -z "$hashed_password" ]; then
# Generate random password # Generate random password
password=$(openssl rand -hex 8) password=$(ynh_string_random --length=8)
hashed_password=$(echo -n $password | sha256sum | cut -d' ' -f1) hashed_password=$(echo -n $password | sha256sum | cut -d' ' -f1)
echo "The new version of LSTU provide an admin and a stats area which required a password. echo "The new version of LSTU provide an admin and a stats area which required a password.