summarylogtreecommitdiffstats
path: root/odoo.install
diff options
context:
space:
mode:
authorStanislas H.B. Sodonon2015-06-08 11:32:35 +0100
committerStanislas H.B. Sodonon2015-06-08 11:32:35 +0100
commit590fae2a56125d98ec66d707499a9e5d96306f50 (patch)
tree1411dfb7f0c3b7157450469b3a0b7d54bef7f37f /odoo.install
downloadaur-590fae2a56125d98ec66d707499a9e5d96306f50.tar.gz
Initial New aur commit
Diffstat (limited to 'odoo.install')
-rw-r--r--odoo.install28
1 files changed, 28 insertions, 0 deletions
diff --git a/odoo.install b/odoo.install
new file mode 100644
index 00000000000..e754096ae0f
--- /dev/null
+++ b/odoo.install
@@ -0,0 +1,28 @@
+pre_install(){
+ if [ ! `grep odoo /etc/group` ]; then
+ groupadd odoo &>/dev/null;
+ fi
+ id odoo &>/dev/null || useradd -r -m -g odoo -d /var/lib/odoo odoo
+}
+
+post_install() {
+ systemctl --system daemon-reload
+ echo "-- Make sure PostgreSQL is correctly installed (see wiki), start it,"
+ echo "-- create user with database creation rights for odoo in PostgreSQL"
+ echo "-- e.g: # su - postgres -c \"createuser -dRSP <myodoouser>\""
+ echo "-- then edit '/etc/openerp/openerp-server.conf' accordingly."
+ echo "-- Starting odoo will automatically start PostgreSQL as well."
+}
+
+post_upgrade() {
+ post_install
+ systemctl --system daemon-reload
+}
+
+post_remove() {
+ userdel odoo &> /dev/null
+ groupdel odoo &> /dev/null
+ systemctl --system daemon-reload
+}
+
+# vim:set ts=2 sw=2 et: