|
|
@ -43,10 +43,14 @@ if [ "$state_should" != "$state_is" ]; then |
|
|
|
if [ -f "$__object/parameter/owner" ]; then |
|
|
|
if [ -f "$__object/parameter/owner" ]; then |
|
|
|
owner="-O \"$(cat "$__object/parameter/owner")\"" |
|
|
|
owner="-O \"$(cat "$__object/parameter/owner")\"" |
|
|
|
fi |
|
|
|
fi |
|
|
|
echo "su - '$postgres_user' -c \"createdb $owner \"$name\"\"" |
|
|
|
cat << EOF |
|
|
|
|
|
|
|
su - '$postgres_user' -c "createdb $owner \"$name\"" |
|
|
|
|
|
|
|
EOF |
|
|
|
;; |
|
|
|
;; |
|
|
|
absent) |
|
|
|
absent) |
|
|
|
echo "su - '$postgres_user' -c \"dropdb \"$name\"\"" |
|
|
|
cat << EOF |
|
|
|
|
|
|
|
su - '$postgres_user' -c "dropdb \"$name\"" |
|
|
|
|
|
|
|
EOF |
|
|
|
;; |
|
|
|
;; |
|
|
|
esac |
|
|
|
esac |
|
|
|
fi |
|
|
|
fi |
|
|
|