Revision b2a63751
Added by Greg Sutcliffe about 11 years ago
debian/wheezy/foreman/foreman.postinst | ||
---|---|---|
|
||
. /usr/share/debconf/confmodule
|
||
|
||
# if this script aborts with an error dpkg can hang if a debconf can
|
||
LOGFILE='/var/log/foreman-install.log'
|
||
|
||
# if this script aborts with an error dpkg can hang if a debconf can
|
||
# hang if daemons have been started
|
||
trap db_stop EXIT
|
||
|
||
... | ... | |
if [ ! -z "${DEBUG}" ]; then
|
||
$CMD
|
||
else
|
||
$CMD 2>&1 >/dev/null
|
||
$CMD 2>&1 >> $LOGFILE
|
||
fi
|
||
|
||
# Run a db:migrate if the user has created a dbfile
|
||
... | ... | |
if [ ! -z "${DEBUG}" ]; then
|
||
su - foreman -s /bin/sh -c /usr/share/foreman/extras/dbmigrate || true
|
||
else
|
||
su - foreman -s /bin/sh -c /usr/share/foreman/extras/dbmigrate >/dev/null 2>&1 || true
|
||
su - foreman -s /bin/sh -c /usr/share/foreman/extras/dbmigrate >> $LOGFILE 2>&1 || true
|
||
fi
|
||
fi
|
||
|
||
... | ... | |
#if [ ! -z "${DEBUG}" ]; then
|
||
#rake -f /usr/share/foreman/Rakefile -t security:generate_token
|
||
#else
|
||
#rake -f /usr/share/foreman/Rakefile security:generate_token >/dev/null 2>&1
|
||
#rake -f /usr/share/foreman/Rakefile security:generate_token >> $LOGFILE 2>&1
|
||
#fi
|
||
#fi
|
||
|
Also available in: Unified diff
Add logfile to command ouput for install/upgrade