From 3decce1d5c1fe8f3629619c59f45f90b4a916357 Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Fri, 21 Aug 2020 19:19:29 +0000 Subject: [PATCH] auto generate the postgres username/passwd during install --- install.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index 369bc7d7..d818fa14 100755 --- a/install.sh +++ b/install.sh @@ -15,6 +15,8 @@ DJANGO_SEKRET=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 80 | head -n 1) SALTPW=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 20 | head -n 1) ADMINURL=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 70 | head -n 1) MESHPASSWD=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 25 | head -n 1) +pgusername=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 8 | head -n 1) +pgpw=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 20 | head -n 1) GREEN='\033[0;32m' YELLOW='\033[1;33m' @@ -87,11 +89,6 @@ fi echo -ne "${YELLOW}Create a username for meshcentral${NC}: " read meshusername -echo -ne "${YELLOW}Create a username for the postgres database${NC}: " -read pgusername -echo -ne "${YELLOW}Create a password for the postgres database${NC}: " -read pgpw - while [[ $letsemail != *[@]*[.]* ]] do echo -ne "${YELLOW}Enter a valid email address for let's encrypt renewal notifications and meshcentral${NC}: "