mirror of
https://github.com/nextcloud/vm.git
synced 2025-10-26 11:27:32 +00:00
fix "command not found"
This commit is contained in:
parent
0c9bba6bbc
commit
f0ec6d2373
24
lib.sh
24
lib.sh
@ -18,18 +18,6 @@ RORDIR=/opt/es/
|
||||
NC_APPS_PATH=$NCPATH/apps
|
||||
VMLOGS=/var/log/nextcloud
|
||||
|
||||
# Helper function for generating random passwords
|
||||
gen_passwd() {
|
||||
local length=$1
|
||||
local charset="$2"
|
||||
local password=""
|
||||
while [ ${#password} -lt "$length" ]
|
||||
do
|
||||
password=$(echo "$password""$(head -c 100 /dev/urandom | LC_ALL=C tr -dc "$charset")" | fold -w "$length" | head -n 1)
|
||||
done
|
||||
print_text_in_color "$ICyan" "$password"
|
||||
}
|
||||
|
||||
# Ubuntu OS
|
||||
DISTRO=$(lsb_release -sd | cut -d ' ' -f 2)
|
||||
KEYBOARD_LAYOUT=$(localectl status | grep "Layout" | awk '{print $3}')
|
||||
@ -1176,6 +1164,18 @@ do
|
||||
done
|
||||
}
|
||||
|
||||
# Helper function for generating random passwords
|
||||
gen_passwd() {
|
||||
local length=$1
|
||||
local charset="$2"
|
||||
local password=""
|
||||
while [ ${#password} -lt "$length" ]
|
||||
do
|
||||
password=$(echo "$password""$(head -c 100 /dev/urandom | LC_ALL=C tr -dc "$charset")" | fold -w "$length" | head -n 1)
|
||||
done
|
||||
echo "$password"
|
||||
}
|
||||
|
||||
## bash colors
|
||||
# Reset
|
||||
Color_Off='\e[0m' # Text Reset
|
||||
|
||||
Loading…
Reference in New Issue
Block a user