install.sh
changeset 0 bb0aa2102206
child 4 f3c30b7421b9
equal deleted inserted replaced
-1:000000000000 0:bb0aa2102206
       
     1 #!/bin/bash
       
     2 # $Id$
       
     3 #
       
     4 # Installation script for the vmm
       
     5 # run: ./install.sh
       
     6 
       
     7 LANG=C
       
     8 PATH=/usr/sbin:/usr/bin
       
     9 INSTALL_OPTS="-g 0 -o 0 -p -v"
       
    10 PREFIX=/usr/local
       
    11 PF_CONFDIR=$(postconf -h config_directory)
       
    12 PF_GID=$(id -g postfix)
       
    13 
       
    14 if [ $(id -u) -ne 0 ]; then
       
    15     echo "Run this script as root."
       
    16     exit 1
       
    17 fi
       
    18 
       
    19 python setup.py install --prefix ${PREFIX}
       
    20 python setup.py clean --all >/dev/null
       
    21 
       
    22 install -b -m 0600 ${INSTALL_OPTS} vmm.cfg ${PREFIX}/etc/
       
    23 install -b -m 0640 -g ${PF_GID} -o 0 -p -v pgsql-*.cf ${PF_CONFDIR}/
       
    24 install -m 0700 ${INSTALL_OPTS} vmm ${PREFIX}/sbin/
       
    25 
       
    26 echo
       
    27 echo "Don't forget to edit ${PREFIX}/etc/vmm.cfg"
       
    28 echo "and ${PF_CONFDIR}/pgsql-*.cf files."
       
    29 echo