From 4d83ea17200fd801ae71e780e576b8818d7d93d3 Mon Sep 17 00:00:00 2001 From: dinger1986 Date: Sun, 3 Dec 2023 20:18:55 +0000 Subject: [PATCH] Update install.sh --- install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 2a3755e..66a5aab 100644 --- a/install.sh +++ b/install.sh @@ -170,7 +170,8 @@ echo "Installing Postgresql" if [ "${ID}" = "debian" ] || [ "$OS" = "Ubuntu" ] || [ "$OS" = "Debian" ] || [ "${UPSTREAM_ID}" = "ubuntu" ] || [ "${UPSTREAM_ID}" = "debian" ]; then sudo apt-get install -y postgresql > null elif [ "$OS" = "CentOS" ] || [ "$OS" = "RedHat" ] || [ "${UPSTREAM_ID}" = "rhel" ] || [ "${OS}" = "Almalinux" ] || [ "${UPSTREAM_ID}" = "Rocky*" ] || [ "${UPSTREAM_ID}" = "suse" ]; then - sudo yum install -y postgresql + sudo yum install -y postgresql-server + /usr/bin/postgresql-setup --initdb elif [ "${ID}" = "arch" ] || [ "${UPSTREAM_ID}" = "arch" ]; then sudo pacman -S postgresql else @@ -181,7 +182,7 @@ sudo systemctl enable postgresql sudo systemctl start postgresql while ! [[ $CHECK_POSTGRES_SERVICE ]]; do - CHECK_POSTGRES_SERVICE=$(sudo systemctl status postgresql.service | grep "Active: active (exited)") + CHECK_POSTGRES_SERVICE=$(sudo systemctl status postgresql.service | grep -E "Active: active \(running\)|Active: active \(exited\)") echo -ne "PostgreSQL is not ready yet...${NC}\n" sleep 3 done