diff --git a/install.sh b/install.sh index 8b9aed57..af6b8a51 100644 --- a/install.sh +++ b/install.sh @@ -105,7 +105,6 @@ install_base() { gen_random_string() { local length="$1" - # openssl output base64, no need /dev/urandom + tr openssl rand -base64 $(( length * 2 )) \ | tr -dc 'a-zA-Z0-9' \ | head -c "$length" diff --git a/update.sh b/update.sh index 5dce0ce3..9365bf8a 100755 --- a/update.sh +++ b/update.sh @@ -100,8 +100,9 @@ is_port_in_use() { gen_random_string() { local length="$1" - local random_string=$(LC_ALL=C tr -dc 'a-zA-Z0-9'