root/alternc-phpcron/trunk/debian/postinst

Revision 1253, 1.1 kB (checked in by anonymous, 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-phpcron postinst
4 # Benjamin Sonntag <benjamin@alternc.org>
5
6 # Uses AlternC.conf
7 if [ -x /etc/alternc/local.sh ]
8 then
9     . /etc/alternc/local.sh
10 fi
11
12 case "$1" in
13 configure)
14
15     # 1st, configure the table if required
16     mysql -h"$MYSQL_HOST" -p"$MYSQL_PASS" -u"$MYSQL_USER" "$MYSQL_DATABASE" </usr/share/alternc/phpcron.sql
17
18     # Then, configure the quota for "phpcron"
19     db_get alternc-phpcron/quota_create_ask
20     /usr/share/alternc/quota_init phpcron $RET
21
22     # Compile the po files :
23     /usr/lib/alternc/dopo.sh
24
25     # Finally, add this module to the AlternC's menu :
26     if [ -z `grep menu_phpcron.php /var/alternc/bureau/admin/menulist.txt` ]
27     then
28         echo "menu_phpcron.php" >>/var/alternc/bureau/admin/menulist.txt
29     fi
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.