#!/bin/sh
# POST-INSTALL script

MODE=$2
INSTALL_PREFIX=/usr/local

if [ "X$MODE" = "XPOST-INSTALL" ]; then
    find $INSTALL_PREFIX/sitebuilder/ -nouser | xargs chown www:www
    if ! /usr/local/bin/sb_config --update_modules; then
        echo "SiteBuilder may not function properly due to configuration errors"
        echo "If you expirience problems try running 'sb_config --update_modules'"
    fi
fi

exit 0
