]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/updatedb/update_postgresql_tables_10_to_11.in
Remove last traces of @SQL_BINDIR@ and @DB_TYPE@
[bacula/bacula] / bacula / updatedb / update_postgresql_tables_10_to_11.in
index 87381c29f26cc4cd42466460b1c7f05c5b61134c..f5df19f2ba1893f573b27f8aa527809a31a471d4 100644 (file)
@@ -6,11 +6,11 @@ echo " "
 echo "This script will update a Bacula PostgreSQL database from version 10 to 11"
 echo " which is needed to convert from Bacula version 2.0.0 to 3.0.x or higher"
 echo " "
-bindir=@SQL_BINDIR@
-db_name=@db_name@
-
-if $bindir/psql -f - -d ${db_name} $* <<END-OF-DATA
+bindir=@POSTGRESQL_BINDIR@
+PATH="$bindir:$PATH"
+db_name=${db_name:-@db_name@}
 
+psql -f - -d ${db_name} $* <<END-OF-DATA
 -- The alter table operation can be faster with a big maintenance_work_mem
 -- Uncomment and adapt this value to your environment
 -- SET maintenance_work_mem = '1GB';