File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,8 @@ BACKUP_DISK_LIMIT=95
1919BACKUP_LA_LIMIT=5
2020RRD_STEP=300
2121RRD_IFACE_EXCLUDE=lo
22-
22+ PW_MATRIX=' 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
23+ PW_LENGHT=' 10'
2324BIN=$VESTA /bin
2425USER_DATA=$VESTA /data/users/$user
2526WEBTPL=$VESTA /data/templates/web
@@ -128,10 +129,10 @@ is_package_full() {
128129
129130# Random password generator
130131gen_password () {
131- matrix= ' 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz '
132- lenght=10
133- while [ ${n:= 1} -le $lenght ]; do
134- pass=" $pass ${matrix : $(($RANDOM % ${# matrix } )): 1} "
132+ pw_matrix= ${1- $PW_MATRIX }
133+ pw_lenght= ${2- $PW_LENGHT }
134+ while [ ${n:= 1} -le $pw_lenght ]; do
135+ pass=" $pass ${pw_matrix : $(($RANDOM % ${# pw_matrix } )): 1} "
135136 let n+=1
136137 done
137138 echo " $pass "
You can’t perform that action at this time.
0 commit comments