mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 10:37:39 -07:00
Added reset key support
This commit is contained in:
parent
5458c49d39
commit
2545b45e47
5 changed files with 21 additions and 6 deletions
|
@ -1053,3 +1053,13 @@ is_backup_enabled() {
|
|||
exit $E_BACKUP_DISABLED
|
||||
fi
|
||||
}
|
||||
|
||||
gen_password() {
|
||||
MATRIX='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
|
||||
LENGTH=10
|
||||
while [ ${n:=1} -le $LENGTH ]; do
|
||||
PASS="$PASS${MATRIX:$(($RANDOM%${#MATRIX})):1}"
|
||||
let n+=1
|
||||
done
|
||||
echo "$PASS"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue