Explorar o código

Update hst-install-debian.sh

vestacp-user %!s(int64=5) %!d(string=hai) anos
pai
achega
0603a26260
Modificáronse 1 ficheiros con 1 adicións e 7 borrados
  1. 1 7
      install/hst-install-debian.sh

+ 1 - 7
install/hst-install-debian.sh

@@ -105,13 +105,7 @@ download_file() {
 
 # Defining password-gen function
 gen_pass() {
-    MATRIX='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
-    LENGTH=16
-    while [ ${n:=1} -le $LENGTH ]; do
-        PASS="$PASS${MATRIX:$(($RANDOM%${#MATRIX})):1}"
-        let n+=1
-    done
-    echo "$PASS"
+    cat /dev/urandom | tr -dc [:alnum:] | head -c16
 }
 
 # Defining return code check function