#!/bin/bash
+# tmp - (or?)
+set -x
# if this requires a service to be running, add something like this
# update-rc.d unfold defaults
[ -d /var/unfold ] || mkdir /var/unfold
chown -R www-data.www-data /var/unfold
chmod -R 700 /var/unfold
-# upgrading from older packages -- temporary
-[ -f /usr/share/unfold/myslice.sqlite3 ] && mv -f /usr/share/unfold/myslice.sqlite3 /var/unfold
-rm -f /etc/apache2/sites*/myslice.conf
# upgrading end
/usr/share/unfold/manage.py syncdb
/usr/share/unfold/manage.py migrate
-a2dissite default
+# enable required stuff
+a2enmod ssl
+# name seems to depend on the debian distro
+a2dissite default || a2dissite 000-default || :
a2ensite unfold.conf
+# create a server-side cert/key and passes on gids to rehash them
+unfold-init-ssl.sh
service apache2 restart