in PATH we trust

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
remotes/origin/feature_files_export
Steven Armstrong 14 years ago
parent 94cdf36439
commit 2cf67e321e
  1. 4
      conf/type/__postgres_database/gencode-remote
  2. 4
      conf/type/__postgres_role/gencode-remote

@ -29,10 +29,10 @@ if [ "$state_should" != "$state_is" ]; then
if [ -f "$__object/parameter/owner" ]; then
owner="-O '$(cat "$__object/parameter/owner")'"
fi
echo "su - postgres -c \"/usr/bin/createdb $owner '$name'\""
echo "su - postgres -c \"createdb $owner '$name'\""
;;
absent)
echo "su - postgres -c \"/usr/bin/dropdb '$name'\""
echo "su - postgres -c \"dropdb '$name'\""
;;
esac
fi

@ -45,10 +45,10 @@ if [ "$state_is" != "$state_should" ]; then
[ "$inherit" = "true" ] && inherit="INHERIT" || inherit="NOINHERIT"
cmd="CREATE ROLE $name WITH $password $login $createdb $createrole $superuser $inherit"
echo "su - postgres -c \"/usr/bin/psql -c \\\"$cmd\\\"\""
echo "su - postgres -c \"psql -c \\\"$cmd\\\"\""
;;
absent)
echo "su - postgres -c \"/usr/bin/dropuser \\\"$name\\\"\""
echo "su - postgres -c \"dropuser \\\"$name\\\"\""
;;
esac
fi

Loading…
Cancel
Save