fix "command not found"

This commit is contained in:
Daniel Hansson 2020-03-01 11:08:57 +01:00 committed by GitHub
parent 0c9bba6bbc
commit f0ec6d2373
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

24
lib.sh
View File

@ -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