1
0
mirror of https://github.com/myvesta/vesta.git synced 2025-03-12 04:35:23 -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

@ -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
@ -143,4 +154,4 @@ FLUSH PRIVILEGES;
MYSQL_PMA3
#MYSQL DB and TABLES ADDITION
mysql -uroot < /root/phpmyadmin/create_tables.sql
mysql -uroot < /root/phpmyadmin/create_tables.sql