[ckan-changes] commit/ckanext-std: jame... at okfn.org: Fixes from the test system
Bitbucket
commits-noreply at bitbucket.org
Wed Jun 15 15:31:25 UTC 2011
1 new changeset in ckanext-std:
http://bitbucket.org/okfn/ckanext-std/changeset/33b512eb57b3/
changeset: 33b512eb57b3
user: jame... at okfn.org
date: 2011-06-15 17:31:29
summary: Fixes from the test system
affected #: 1 file (22 bytes)
--- a/package/DEBIAN/postinst Tue Jun 14 10:29:37 2011 +0100
+++ b/package/DEBIAN/postinst Wed Jun 15 15:31:29 2011 +0000
@@ -10,7 +10,6 @@
# Exit immediately if there is ever a command that returns a non-zero value
# and don't process any more commands, most likley leaving CKAN in maintenance
# mode
-set -e
# Check we are root, something has gone very wrong if we are not!
if [[ $EUID -ne 0 ]]; then
@@ -20,6 +19,9 @@
INSTANCE="std"
+echo "Ensuring users and groups are set up correctly ..."
+ckan_ensure_users_and_groups ${INSTANCE}
+
# Disable any existing crontabs during the upgrade, we don't want
# scripts running when things are still changing
echo "Disabling the crontab for the ckan${INSTANCE} user ..."
@@ -30,15 +32,12 @@
crontab -u ckan${INSTANCE} ${PACKAGED_CRONJOB}
# Try to put CKAN into maintenance mode, if it is installed
-if ! [ -f /etc/apache2/sites-available/${INSTANCE}.maint ] ; then
+if [ -f /etc/apache2/sites-available/${INSTANCE}.maint ] ; then
# We have a maintence mode available
echo "Putting CKAN into maintenance mode ..."
ckan_maintenance_on ${INSTANCE}
fi
-echo "Ensuring users and groups are set up correctly ..."
-ckan_ensure_users_and_groups ${INSTANCE}
-
echo "Ensuring directories exist for ${INSTANCE} CKAN INSTANCE ..."
ckan_make_ckan_directories ${INSTANCE}
@@ -51,9 +50,6 @@
echo "Ensuring ${INSTANCE}.py file exists for data.gov.uk CKAN INSTANCE ..."
ckan_create_wsgi_handler ${INSTANCE}
-echo "Ensuring the ${INSTANCE} database exists ..."
-ckan_ensure_db_exists ${INSTANCE}
-
echo "Ensuring ${INSTANCE}.ini file exists for data.gov.uk CKAN INSTANCE ..."
if ! [ -f /etc/ckan/${INSTANCE}/${INSTANCE}.ini ] ; then
# Create a password
@@ -75,6 +71,9 @@
sed -e "s,^\(ckan.plugins\)[ =].*,\1 = ${INSTANCE}," \
-i /etc/ckan/${INSTANCE}/${INSTANCE}.ini
+echo "Ensuring the ${INSTANCE} database exists ..."
+ckan_ensure_db_exists ${INSTANCE}
+
# Overwrite the existing Apache config
if [ -f /etc/apache2/sites-enabled/default ] ; then
echo "Disabling the default Apache site ..."
@@ -82,7 +81,7 @@
fi
echo "Overwriting the existing Apache config ..."
-ckan_overwrite_apache_config ${INSTANCE} ckan.localhost localhost
+ckan_overwrite_apache_config ${INSTANCE} ckan${INSTANCE}.localhost ckan${INSTANCE}.yourdomain.org
# Make sure mod_rewrite is enabled
if ! [ -f /etc/apache2/mods-enabled/rewrite.load ] ; then
Repository URL: https://bitbucket.org/okfn/ckanext-std/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the ckan-changes
mailing list