diff --git a/install/debian/10/pma/pma.sh b/install/debian/10/pma/pma.sh index 81878b02..53ec9982 100644 --- a/install/debian/10/pma/pma.sh +++ b/install/debian/10/pma/pma.sh @@ -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 \ No newline at end of file +mysql -uroot < /root/phpmyadmin/create_tables.sql