mirror of
https://github.com/techahold/Meshcentral-Installer.git
synced 2026-05-21 14:02:15 +00:00
Update install.sh
This commit is contained in:
@@ -170,7 +170,8 @@ echo "Installing Postgresql"
|
|||||||
if [ "${ID}" = "debian" ] || [ "$OS" = "Ubuntu" ] || [ "$OS" = "Debian" ] || [ "${UPSTREAM_ID}" = "ubuntu" ] || [ "${UPSTREAM_ID}" = "debian" ]; then
|
if [ "${ID}" = "debian" ] || [ "$OS" = "Ubuntu" ] || [ "$OS" = "Debian" ] || [ "${UPSTREAM_ID}" = "ubuntu" ] || [ "${UPSTREAM_ID}" = "debian" ]; then
|
||||||
sudo apt-get install -y postgresql > null
|
sudo apt-get install -y postgresql > null
|
||||||
elif [ "$OS" = "CentOS" ] || [ "$OS" = "RedHat" ] || [ "${UPSTREAM_ID}" = "rhel" ] || [ "${OS}" = "Almalinux" ] || [ "${UPSTREAM_ID}" = "Rocky*" ] || [ "${UPSTREAM_ID}" = "suse" ]; then
|
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
|
elif [ "${ID}" = "arch" ] || [ "${UPSTREAM_ID}" = "arch" ]; then
|
||||||
sudo pacman -S postgresql
|
sudo pacman -S postgresql
|
||||||
else
|
else
|
||||||
@@ -181,7 +182,7 @@ sudo systemctl enable postgresql
|
|||||||
sudo systemctl start postgresql
|
sudo systemctl start postgresql
|
||||||
|
|
||||||
while ! [[ $CHECK_POSTGRES_SERVICE ]]; do
|
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"
|
echo -ne "PostgreSQL is not ready yet...${NC}\n"
|
||||||
sleep 3
|
sleep 3
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user