projects
/
invirt/packages/invirt-database.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update changelog
[invirt/packages/invirt-database.git]
/
debian
/
invirt-database-server.postinst
diff --git
a/debian/invirt-database-server.postinst
b/debian/invirt-database-server.postinst
index
f6615e5
..
f5cd5a9
100644
(file)
--- a/
debian/invirt-database-server.postinst
+++ b/
debian/invirt-database-server.postinst
@@
-33,9
+33,13
@@
case "$1" in
# Don't fail if the user/database already exists
su postgres -c 'createuser invirt -S -d -R' || true
su postgres -c 'createdb invirt -O invirt' || true
# Don't fail if the user/database already exists
su postgres -c 'createuser invirt -S -d -R' || true
su postgres -c 'createdb invirt -O invirt' || true
- adduser --system invirt
fi
fi
- /etc/init.d/postgresql-8.3 restart
+
+ # The invirt user *must* exist
+ if ! getent passwd invirt >/dev/null 2>&1; then
+ adduser --system invirt
+ fi
+ invoke-rc.d postgresql-8.3 restart
su invirt -s /bin/sh -c 'invirt-database-tables create'
;;
su invirt -s /bin/sh -c 'invirt-database-tables create'
;;