#! /bin/sh set -e # Source debconf library. . /usr/share/debconf/confmodule if [ "$DPKG_DEBUG" = "developer" ] || [ ! -z "$DEBUG" ]; then set -x fi if su -s /bin/sh aegir -c 'drush @hostmaster status' 2>&1 | grep -q 'Drupal bootstrap.*Successful'; then # there's already an install, do not go around asking silly questions db_fget aegir/makefile "seen" || true if [ "$RET" = "false" ]; then # ... except if that makefile question was never asked, in # which case we're probably upgrading from a custom install, # so we need to ask for the custom install makefile db_fset aegir/makefile "seen" "false" || true db_input medium aegir/makefile || true db_go fi exit 0 fi db_get aegir/email if [ -z "$RET" ]; then db_set aegir/email "aegir@`hostname -f`" fi db_get aegir/site if [ -z "$RET" ]; then db_set aegir/site `hostname -f` fi db_input low aegir/email ||true db_input high aegir/site || true db_input low aegir/makefile || true db_input low aegir/db_host || true db_input low aegir/db_user || true # if we got here, it means aegir is not installed and we forgot the # root password, ask for it again db_fset aegir/db_password "seen" "false" || true db_input high aegir/db_password || true db_go