#!/bin/sh # postinst script for campcaster # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-remove' # * `abort-deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package installdir=/usr/lib/campcaster vardir=/var/lib/campcaster apache_group=www-data if [ -d /etc/postgresql/8.1 ]; then postgresql_dir=/etc/postgresql/8.1/main postgresql_init_script=/etc/init.d/postgresql-8.1 elif [ -d /etc/postgresql/8.2 ]; then postgresql_dir=/etc/postgresql/8.2/main postgresql_init_script=/etc/init.d/postgresql-8.2 elif [ -d /etc/postgresql/8.3 ]; then postgresql_dir=/etc/postgresql/8.3/main postgresql_init_script=/etc/init.d/postgresql-8.3 elif [ -d /etc/postgresql/8.4 ]; then postgresql_dir=/etc/postgresql/8.4/main postgresql_init_script=/etc/init.d/postgresql-8.4 else echo "no postgresql 8.1, 8.2, 8.3 or 8.4 found" >&2 exit 1 fi case "$1" in configure) # do post-installation configuration $installdir/bin/postInstallStation.sh --directory=$installdir \ --apache-group=$apache_group \ --postgresql-dir=$postgresql_dir \ --postgresql-init-script=$postgresql_init_script # remount the NFS share if we have a 2-computer setup if [ -f $vardir/storageServer.wasMounted ]; then echo "Remounting the remote storage..." mount $vardir/storageServer rm $vardir/storageServer.wasMounted fi ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0