]> git.wh0rd.org - tt-rss.git/blame - debian/tt-rss-mysql.postinst
experimental split of public calls into public.php (refs #389)
[tt-rss.git] / debian / tt-rss-mysql.postinst
CommitLineData
d0cafcf4
AD
1#!/bin/sh
2set -e
3
4PACKAGE=tt-rss-mysql
5
6case "$1" in
7 configure)
8
9 # source debconf stuff
10 if [ -f /usr/share/debconf/confmodule ]; then
11 . /usr/share/debconf/confmodule
12 fi
13
14 # debconf messages
15 db_get $PACKAGE/webserver || true
16 WEBSERVER="$RET";
17
18 # webserver configuration
19 if $WEBSERVER; then
20 if [ ! -d /etc/apache2/conf.d/ ]; then
21 install -d -m755 /etc/apache2/conf.d/
22 fi
23
24 if [ ! -e /etc/apache2/conf.d/$PACKAGE.conf ]; then
25 ln -s /etc/$PACKAGE/apache.conf /etc/apache2/conf.d/$PACKAGE.conf
26 #sed -e "s#tt-rss/www#$PACKAGE/www#" -i /etc/$PACKAGE/apache.conf
27 fi
28 if apache2ctl configtest 2>/dev/null; then
29 invoke-rc.d apache2 force-reload || true
30 else
31 echo "apache need to be reload manualy"
32 fi
33 fi
34
35 # dbconfig-common
36 . /usr/share/dbconfig-common/dpkg/postinst.mysql
37 dbc_first_version="1.3.1"
38 dbc_generate_include="php:/etc/$PACKAGE/database.php"
39 dbc_generate_include_owner="root:www-data"
40 dbc_generate_include_perms="0640"
41 dbc_go $PACKAGE $@
42
43 echo "Install ok on http://localhost/tt-rss/tt-rss.php"
44 ;;
45
46 abort-upgrade|abort-remove|abort-deconfigure)
47 ;;
48
49 *)
50 echo "postinst called with unknown argument \`$1'" >&2
51 exit 1
52 ;;
53esac
54
55exit 0
56#DEBHELPER#