~0k.io/ocb-server/usability-and-fix-on-res-partner-1

« back to all changes in this revision

Viewing changes to debian/openerp-server.postinst

Merge commit 'c18f2a7474c9' into mdv-gpl3-py26

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
set -e
 
4
 
 
5
USER="openerp"
 
6
CONFFILE="/etc/openerp-server.conf"
 
7
LOGFILE="/var/log/openerp.log"
 
8
 
 
9
case "${1}" in
 
10
        configure)
 
11
                # Creating system user
 
12
                adduser --no-create-home --quiet --system ${USER}
 
13
 
 
14
                # Creating log file
 
15
                touch ${LOGFILE}
 
16
                chown ${USER}:adm ${LOGFILE}
 
17
                chmod 0640 ${LOGFILE}
 
18
 
 
19
                # Setting ownership
 
20
                chown ${USER} /usr/lib/openerp-server/addons -R
 
21
 
 
22
                chmod 0640 ${CONFFILE}
 
23
                chown ${USER} ${CONFFILE}
 
24
 
 
25
                echo
 
26
                echo "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *"
 
27
                echo "* OpenERP uses a PostgreSQL database to store its data. With the first *"
 
28
                echo "* generation of packages, you have to setup this database manually.     *"
 
29
                echo "* Please read /usr/share/doc/openerp-server/README.Debian how to do it. *"
 
30
                echo "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *"
 
31
                echo
 
32
                ;;
 
33
 
 
34
        abort-upgrade|abort-remove|abort-deconfigure)
 
35
 
 
36
                ;;
 
37
 
 
38
        *)
 
39
                echo "postinst called with unknown argument \`{$1}'" >&2
 
40
                exit 1
 
41
                ;;
 
42
esac
 
43
 
 
44
#DEBHELPER#
 
45
 
 
46
exit 0