root/alternc-doc/branches/r0/debian/postinst

Revision 1119, 1.1 kB (checked in by benjamin, 4 years ago)

Initial revision

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1 #!/bin/sh -e
2
3 # Debian alternc-cacti postinst
4 # Benjamin Sonntag <benjamin@alternc.org>
5
6 # Uses debconf
7 . /usr/share/debconf/confmodule
8 # Uses AlternC.conf
9 if [ -r /etc/alternc/local.sh ]
10 then
11     . /etc/alternc/local.sh
12 fi
13
14 case "$1" in
15 configure)
16         ## for older alternc version
17     if [ -z "$MYSQL_HOST" ]
18         then
19         MYSQL_HOST="localhost"
20     fi
21     # 1st, configure the table __if required__ The added stid will fail if it is a reinstall, whatever ...
22     mysql -h"$MYSQL_HOST" -p"$MYSQL_PASS" -u"$MYSQL_USER" "$MYSQL_DATABASE" </usr/share/alternc/cacti.sql || true
23
24     db_get alternc-cacti/postconfiguration || true
25
26     # Compile the po files :
27     /usr/share/alternc/install/dopo.sh || true
28     /etc/init.d/apache reload || true
29     /etc/init.d/apache-ssl reload || true
30
31     ;;
32
33 abort-upgrade)
34     exit 0
35     ;;
36
37 abort-remove|abort-deconfigure)
38     exit 0
39     ;;
40
41 *)
42     echo "postinst called with unknown argument '$1'" >&2
43     exit 1
44     ;;
45 esac
46
47 # dh_installdeb will replace this with shell code automatically
48 # generated by other debhelper scripts.
49
50 #DEBHELPER#
51
52 exit 0
Note: See TracBrowser for help on using the browser.