~intrahealth+informatics/ihris-manage/4.3.3-release

« back to all changes in this revision

Viewing changes to packaging-site-blank/targets/vivid/debian/postinst

  • Committer: Nobert Mijumbi
  • Date: 2018-04-10 17:10:46 UTC
  • Revision ID: nobertmn@gmail.com-20180410171046-c7if94waafb4jcni
Tags: 4.3.1.2-ubuntu-site-blank-release
"Ubuntu Blank Site Release Version 4.3.1.2"

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash
2
 
set -x
3
 
 
4
 
USERNAME=ihris
5
 
PHP=/usr/bin/php
6
 
 
7
 
BASEDIR=/var/lib/iHRIS
8
 
chown -R $USERNAME:$USERNAME $BASEDIR
9
 
 
10
 
 
11
 
. /usr/share/debconf/confmodule
12
 
. /usr/share/dbconfig-common/dpkg/postinst 
13
 
. /usr/share/dbconfig-common/dpkg/postinst.mysql
14
 
 
15
 
dbc_generate_include_owner="root:www-data"
16
 
dbc_generate_include_perms="0640"
17
 
dbc_generate_include=php:/etc/ihris/ihris-manage-site.config-db.php
18
 
 
19
 
if ! dbc_go ihris-manage-site $@ ; then
20
 
        echo 'Automatic configuration of ihris-manage-site using dbconfig-common failed!'
21
 
fi
22
 
 
23
 
 
24
 
 
25
 
service apache2 restart || true
26
 
service memcached restart || true
27
 
 
28
 
cd $BASEDIR/sites/ihris-manage-site/pages
29
 
$PHP index.php --update=1 --force-restart=1
30
 
 
31
 
service apache2 restart || true
32
 
service memcached restart || true
33
 
 
34
 
db_stop