[install] Improved db script to detect ways to start the postgresql server