X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/f14f519c1e261380fac46994e8dec7614ed82d89..254bf1ffce20af018f500b81c37b6172f60beccb:/scripts/inst_postgres_deb.sh diff --git a/scripts/inst_postgres_deb.sh b/scripts/inst_postgres_deb.sh index 6dff83247..49cddc7b6 100755 --- a/scripts/inst_postgres_deb.sh +++ b/scripts/inst_postgres_deb.sh @@ -10,6 +10,7 @@ source /usr/share/debconf/confmodule #Als root anmelden if [ `id -u` -gt 0 ]; then echo "Bitte als root anmelden"; exit 1; fi + POSTGRESQL=`dpkg -l | grep -E "postgresql-[0-9]" | cut -d" " -f3 | sort -r | head -1 -` #Datei plpgsql.so suchen @@ -20,7 +21,7 @@ if [ "$POSTGRESQL#" == "#" ]; then echo Datenbank bitte manuell einrichten. exit 0 else - PLPGSQL=`dpkg -L postgresql-8.3 | grep plpgsql.so` + PLPGSQL=`dpkg -L $POSTGRESQL | grep plpgsql.so ` fi if [ "$PLPGSQL#" == "#" ]; then @@ -53,7 +54,7 @@ fi v8=`su postgres -c "echo 'select version()' | psql template1 2>/dev/null | grep -E "[Ss][Qq][Ll][[:space:]]+8\.[2-9]\.[0-9]" | wc -l"` if [ $v8 -eq 0 ]; then echo $FEHLER - echo Datenbank Version 8x konnte erreicht werden. + echo Datenbank Version 8x konnte nicht erreicht werden. exit 0 fi