This file is indexed.

postinst is in fusiondirectory 1.0.8.8-3ubuntu2.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
#!/bin/sh
# postinst script for fusiondirectory
#
# see: dh_installdeb(1)

set -e

case "$1" in
  configure)
      fusiondirectory-setup -y --check-directories --update-cache --update-locales
      ;;

  abort-upgrade|abort-remove|abort-deconfigure)
      ;;

  triggered)
      fusiondirectory-setup --update-cache --update-locales
      exit 0
      ;;

  *)
      echo "postinst called with unknown argument \`$1'" >&2
      exit 1
      ;;
esac



if [ -d /etc/apache2/conf.d ]; then

  # Copy FusionDirectory configuration to conf.d directories
  if [ ! -L /etc/apache2/conf.d/fusiondirectory.conf ]; then

    # Remove old instances of this file
    if [ -f /etc/apache2/conf.d/fusiondirectory.conf ]; then
      echo "Found old fusiondirectory apache configuration in /etc/apache2/conf.d - moving it to fusiondirectory.conf.orig..."
      echo "Please check for changes in /etc/fusiondirectory/fusiondirectory-apache.conf if you modified this file!"
      mv /etc/apache2/conf.d/fusiondirectory.conf /etc/apache2/conf.d/fusiondirectory.conf.orig
    fi

    echo "Making /fusiondirectory available in /etc/apache2/conf.d"

    # Add FusionDirectory include file
    ln -s /etc/fusiondirectory/fusiondirectory-apache.conf /etc/apache2/conf.d/fusiondirectory.conf
  fi

  # Add support for RequestHeader
  if [ -x /usr/sbin/apache2 ]; then
    if [ -x /usr/sbin/a2enmod ]; then
      a2enmod headers
    fi
  fi

  # Finally restart servers
  if [ -x /usr/sbin/apache2 ]; then
    if [ -x /usr/sbin/invoke-rc.d ]; then
      invoke-rc.d apache2 reload
    else
      /etc/init.d/apache2 reload
    fi
  fi
fi

# conf-available
if [ -d /etc/apache2/conf-available ] ; then

  # Copy FusionDirectory configuration to conf-available directory /etc/apache2/conf-available
  if [ ! -L /etc/apache2/conf-available/fusiondirectory.conf ]; then

    # Remove old instances of this file
    if [ -f /etc/apache2/conf-available/fusiondirectory.conf ]; then
      echo "Found old fusiondirectory apache configuration in /etc/apache2/conf.d - moving it to fusiondirectory.conf.orig..."
      echo "Please check for changes in /etc/fusiondirectory/fusiondirectory-apache.conf if you modified this file!"
      mv /etc/apache2/conf.d/fusiondirectory.conf /etc/apache2/conf.d/fusiondirectory.conf.orig
    fi

    echo "Making /fusiondirectory available in /etc/apache2/conf-available"

    # Add FusionDirectory include file
    ln -s /etc/fusiondirectory/fusiondirectory-apache.conf /etc/apache2/conf-available/fusiondirectory.conf
  fi

  if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
    . /usr/share/apache2/apache2-maintscript-helper
    apache2_invoke enconf fusiondirectory
    apache2_invoke enmod headers
  fi

  # Finally restart servers
  if [ -x /usr/sbin/apache2 ]; then
    if [ -x /usr/sbin/invoke-rc.d ]; then
      invoke-rc.d apache2 reload
    else
      /etc/init.d/apache2 reload
    fi
  fi
fi

# Remove old instances of the fusiondirectory.conf template
if [ -f /var/cache/fusiondirectory/template/fusiondirectory.conf ]; then
  #link the template to /var/cache/fusiondirectory/template from usr
  rm -f /var/cache/fusiondirectory/template/fusiondirectory.conf
  ln -s /usr/share/doc/fusiondirectory/fusiondirectory.conf  /var/cache/fusiondirectory/template/fusiondirectory.conf
else
  #link the configuration template to /var/cache/fusiondirectory/template from /usr/share/doc/fusiondirectory/
  ln -s /usr/share/doc/fusiondirectory/fusiondirectory.conf  /var/cache/fusiondirectory/template/fusiondirectory.conf
fi

exit 0