1
0
Fork 0
mirror of https://github.com/myvesta/vesta synced 2025-08-01 20:34:41 -07:00

gen_pass() in pma.sh

This commit is contained in:
dpeca 2019-07-14 01:10:06 +02:00 committed by GitHub
parent 710cc25148
commit cce2122fb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,6 +10,17 @@
# Changed some lines to fit to Hestia Configuration.
#
# Defining password-gen function
gen_pass() {
MATRIX='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
LENGTH=10
while [ ${n:=1} -le $LENGTH ]; do
PASS="$PASS${MATRIX:$(($RANDOM%${#MATRIX})):1}"
let n+=1
done
echo "$PASS"
}
PASS=$(gen_pass)
#ubuntu phpmyadmin path