ironing out issues during very first install
[myslice.git] / debian / unfold.postinst
index 6da1aee..f0ecf8c 100644 (file)
@@ -1,5 +1,18 @@
 #!/bin/bash
+# tmp - (or?)
+set -x
 # if this requires a service to be running, add something like this
 # update-rc.d unfold defaults
-
-[ -f /etc/apache2/apache2.conf ] && echo "WSGIScriptAlias / /usr/share/unfold/apache/myslice.wsgi"  >> /etc/apache2/apache2.conf
+[ -d /var/unfold ] || mkdir /var/unfold
+chown -R www-data.www-data /var/unfold
+chmod -R 700 /var/unfold
+# upgrading end
+/usr/share/unfold/manage.py syncdb
+/usr/share/unfold/manage.py migrate
+# enable required stuff
+a2enmod ssl
+a2dissite default || :
+a2ensite unfold.conf
+# create a server-side cert/key and passes on gids to rehash them
+unfold-init-ssl.sh
+service apache2 restart