install.sh
author Pascal Volk <neverseen@users.sourceforge.net>
Sun, 02 Mar 2008 20:22:00 +0000
changeset 9 e3d3dbeb5b84
parent 4 f3c30b7421b9
child 14 ebc9b864bc9a
permissions -rwxr-xr-x
* 'create_tables.pgsql' - Added view vmm_domain_info * 'VirtualMailManager/Alias.py' - Removed attribute Alias._aid - Removed parameter basedir from Alias.__init__() and Alias._setAddr() * 'VirtualMailManager/MailLocation.py' - Fixed typo in MailLocation.__init__() * 'VirtualMailManager/Account.py' - Integrated Transport- and MailLocation-stuff - Removed attributes: Account._base and Account._home * 'VirtualMailManager/VirtualMailManager.py' - some small fixes * 'VirtualMailManager/Domain.py' - Added Transport-stuff * 'vmm.cfg' - 'Added option transport in section misc'

#!/bin/bash
# $Id$
#
# Installation script for the Virtual Mail Manager
# run: ./install.sh

LANG=C
PATH=/bin:/usr/sbin:/usr/bin
INSTALL_OPTS="-g 0 -o 0 -p -v"
PREFIX=/usr/local
PF_CONFDIR=$(postconf -h config_directory)
PF_GID=$(id -g postfix)
DOC_DIR=${PREFIX}/share/doc/vmm
DOCS="ChangeLog COPYING INSTALL README"

if [ $(id -u) -ne 0 ]; then
    echo "Run this script as root."
    exit 1
fi

python setup.py install --prefix ${PREFIX}
python setup.py clean --all >/dev/null

install -b -m 0600 ${INSTALL_OPTS} vmm.cfg ${PREFIX}/etc/
install -b -m 0640 -g ${PF_GID} -o 0 -p -v pgsql-*.cf ${PF_CONFDIR}/
install -m 0700 ${INSTALL_OPTS} vmm ${PREFIX}/sbin

[ -d ${DOC_DIR} ] || mkdir -m 0755 -p ${DOC_DIR}
for DOC in ${DOCS}; do
    install -m 0644 ${INSTALL_OPTS} ${DOC} ${DOC_DIR}
done

[ -d ${DOC_DIR}/examples ] || mkdir -m 0755 -p ${DOC_DIR}/examples
install -m 0644 ${INSTALL_OPTS} pgsql-*.cf ${DOC_DIR}/examples
install -m 0644 ${INSTALL_OPTS} vmm.cfg ${DOC_DIR}/examples

echo
echo "Don't forget to edit ${PREFIX}/etc/vmm.cfg"
echo "and ${PF_CONFDIR}/pgsql-*.cf files."
echo