|
#!/bin/sh
|
|
# postinst script for foreman-*
|
|
#
|
|
# see: dh_installdeb(1)
|
|
|
|
if [ ! -z "${DEBUG}" ]; then
|
|
set -x
|
|
else
|
|
set -e
|
|
fi
|
|
|
|
. /usr/share/debconf/confmodule
|
|
|
|
LOGFILE='/var/log/foreman-install.log'
|
|
|
|
# if this script aborts with an error dpkg can
|
|
# hang if daemons have been started
|
|
trap db_stop EXIT
|
|
|
|
# Update gems
|
|
cd /usr/share/foreman
|
|
# Nokogiri causes us pain due to tight dependencies within deface
|
|
# so update it first. We rescue it as trusty will return non-zero if
|
|
# nokogiri isn't in the Gemfile.
|
|
if [ ! -z "${DEBUG}" ]; then
|
|
bundle update nokogiri || true
|
|
bundle update foreman_column_view
|
|
else
|
|
bundle update nokogiri 2>&1 >> $LOGFILE || true
|
|
bundle update foreman_column_view 2>&1 >> $LOGFILE
|
|
fi
|
|
|
|
# Own all the core files
|
|
chown -Rf foreman:foreman '/usr/share/foreman'
|
|
|
|
#DEBHELPER#
|
|
|
|
exit 0
|