File: postinst

package info (click to toggle)
cortado 0.2.2-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,232 kB
  • ctags: 2,515
  • sloc: java: 17,356; xml: 532; sh: 58; makefile: 15
file content (29 lines) | stat: -rw-r--r-- 530 bytes parent folder | download | duplicates (3)
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
#!/bin/sh

set -e

TEMPLATE=/usr/share/doc/cortado/examples/apache2
TARGETDIR=/etc/apache2/conf.d

# install the apache2 config file only when apache2 is actually installed
install_config() {
  if [ -x /etc/init.d/apache2 ]; then
    ucf --three-way --debconf-ok $TEMPLATE $TARGETDIR/cortado
    invoke-rc.d apache2 reload
  fi
}

. /usr/share/debconf/confmodule

case "$1" in
  configure|reconfigure)
    install_config
    ;;
  *)
    echo "postinst called with unknown argument \`$1'" 1>&2
    exit 1
    ;;
esac

#DEBHELPER#