Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # check if package is already exist or not
- echo "* * * * Checking if Postgresql Already exist or not * * * *"
- if [ -f /usr/bin/psql ]
- then
- echo "PostgreSQL is already installed"
- postgresql_version=`psql --version`
- echo $postgresql_version
- else
- echo "* * * * * * Installation of postgresql * * * * * *"
- echo 'Atualizando o sistema... Whatever this means'
- apt-get update -y
- apt-get upgrade -y
- echo ''
- echo 'Instalando...'
- apt-get install postgresql-14
- apt-get install postgresql-client-14
- echo ''
- echo 'Verifying status...'
- systemctl status postgresql.service
- echo 'Cool we done here!!!'
- postgresql_version=$(psql --version)
- echo "$postgresql_version"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement