equal
deleted
inserted
replaced
7 LANG=C |
7 LANG=C |
8 PATH=/bin:/usr/sbin:/usr/bin |
8 PATH=/bin:/usr/sbin:/usr/bin |
9 INSTALL_OPTS="-g 0 -o 0 -p -v" |
9 INSTALL_OPTS="-g 0 -o 0 -p -v" |
10 PREFIX=/usr/local |
10 PREFIX=/usr/local |
11 PF_CONFDIR=$(postconf -h config_directory) |
11 PF_CONFDIR=$(postconf -h config_directory) |
12 PF_GID=$(id -g postfix) |
|
13 DOC_DIR=${PREFIX}/share/doc/vmm |
12 DOC_DIR=${PREFIX}/share/doc/vmm |
14 DOCS="ChangeLog COPYING INSTALL README" |
13 DOCS="ChangeLog COPYING INSTALL README" |
15 |
14 |
16 if [ $(id -u) -ne 0 ]; then |
15 if [ $(id -u) -ne 0 ]; then |
17 echo "Run this script as root." |
16 echo "Run this script as root." |
20 |
19 |
21 python setup.py install --prefix ${PREFIX} |
20 python setup.py install --prefix ${PREFIX} |
22 python setup.py clean --all >/dev/null |
21 python setup.py clean --all >/dev/null |
23 |
22 |
24 install -b -m 0600 ${INSTALL_OPTS} vmm.cfg ${PREFIX}/etc/ |
23 install -b -m 0600 ${INSTALL_OPTS} vmm.cfg ${PREFIX}/etc/ |
25 install -b -m 0640 -g ${PF_GID} -o 0 -p -v pgsql-*.cf ${PF_CONFDIR}/ |
24 install -b -m 0640 ${INSTALL_OPTS} pgsql-*.cf ${PF_CONFDIR}/ |
26 install -m 0700 ${INSTALL_OPTS} vmm ${PREFIX}/sbin |
25 install -m 0700 ${INSTALL_OPTS} vmm ${PREFIX}/sbin |
27 |
26 |
28 [ -d ${DOC_DIR} ] || mkdir -m 0755 -p ${DOC_DIR} |
27 [ -d ${DOC_DIR} ] || mkdir -m 0755 -p ${DOC_DIR} |
29 for DOC in ${DOCS}; do |
28 for DOC in ${DOCS}; do |
30 install -m 0644 ${INSTALL_OPTS} ${DOC} ${DOC_DIR} |
29 install -m 0644 ${INSTALL_OPTS} ${DOC} ${DOC_DIR} |
33 [ -d ${DOC_DIR}/examples ] || mkdir -m 0755 -p ${DOC_DIR}/examples |
32 [ -d ${DOC_DIR}/examples ] || mkdir -m 0755 -p ${DOC_DIR}/examples |
34 install -m 0644 ${INSTALL_OPTS} pgsql-*.cf ${DOC_DIR}/examples |
33 install -m 0644 ${INSTALL_OPTS} pgsql-*.cf ${DOC_DIR}/examples |
35 install -m 0644 ${INSTALL_OPTS} vmm.cfg ${DOC_DIR}/examples |
34 install -m 0644 ${INSTALL_OPTS} vmm.cfg ${DOC_DIR}/examples |
36 |
35 |
37 echo |
36 echo |
38 echo "Don't forget to edit ${PREFIX}/etc/vmm.cfg" |
37 echo "Don't forget to edit ${PREFIX}/etc/vmm.cfg - or run: vmm cf" |
39 echo "and ${PF_CONFDIR}/pgsql-*.cf files." |
38 echo "and ${PF_CONFDIR}/pgsql-*.cf files." |
40 echo |
39 echo |