Fix: Minor
[myslice.git] / debian / unfold.postinst
1 #!/bin/bash
2 # tmp - (or?)
3 set -x
4 # if this requires a service to be running, add something like this
5 # update-rc.d unfold defaults
6 [ -d /var/unfold ] || mkdir /var/unfold
7 chown -R www-data.www-data /var/unfold
8 chmod -R 700 /var/unfold
9 # upgrading end
10 /usr/share/unfold/manage.py syncdb
11 /usr/share/unfold/manage.py migrate
12 # be ready, enable ssl
13 a2enmod ssl
14 # disable defaults; jessie seems to come with 000-default instead of just default
15 # not quite sure about ssl, disable every possible combination
16 for site in default default-ssl; do 
17     for prefix in "" "000-"; do
18         s=${prefix}${site}
19         a2dissite $s || :
20     done
21 done
22 a2ensite unfold.conf
23 # create a server-side cert/key and passes on gids to rehash them
24 # because we do not enable ssl by default it is maybe not quite right to call this
25 # at install-time anymore, although it should not hurt either
26 unfold-init-ssl.sh
27 # restart in any case
28 service apache2 restart