install.sh
author Pascal Volk <neverseen@users.sourceforge.net>
Tue, 08 Jan 2008 21:35:40 +0000
changeset 2 9b39f828aa8a
parent 0 bb0aa2102206
child 4 f3c30b7421b9
permissions -rwxr-xr-x
* 'VirtualMailManager/Exceptions.py' - VMMNotRootException.__init__() calls parent CTor * 'VirtualMailManager/VirtualMailManager.py' - activated check for missing sections/options * 'VirtualMailManager/constants/ERROR.py' - added CONF_* constants from EXIT.py - renumbered * 'VirtualMailManager/constants/EXIT.py' - moved CONF_* constants to ERROR.py * 'VirtualMailManager/Config.py' - implemented VMMConfig.check() - some code cleanups * 'vmm' - some code cleanups

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

LANG=C
PATH=/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)

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/

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