diff --git a/smartgears/ckan_connector/files/ckan-connector.war b/smartgears/ckan_connector/files/ckan-connector.war deleted file mode 100644 index 664464b9..00000000 Binary files a/smartgears/ckan_connector/files/ckan-connector.war and /dev/null differ diff --git a/smartgears/ckan_connector/templates/ckan-connector-fixer.sh.j2 b/smartgears/ckan_connector/templates/ckan-connector-fixer.sh.j2 index 7369d9fe..d593b67d 100644 --- a/smartgears/ckan_connector/templates/ckan-connector-fixer.sh.j2 +++ b/smartgears/ckan_connector/templates/ckan-connector-fixer.sh.j2 @@ -22,6 +22,7 @@ paster sysadmin add $CK_ADMIN -c $CK_INI << EOF y $CK_ADMIN_PWD $CK_ADMIN_PWD + EOF # Get the admin key @@ -36,10 +37,19 @@ CKAN_KEY=$( grep ^beaker\.session\.secret $CK_INI | awk '{ print $3 }' ) [ $? -ne 0 ] && exit 1 # Use the admin key on the connector web.xml -[ ! -z $API_KEY ] && sed -i -e "s#@CKAN_API_KEY@#${API_KEY}#g" $CK_WEB_XML +if [ ! -z $API_KEY ] ; then + sed -i -e "s#@CKAN_API_KEY@#${API_KEY}#g" $CK_WEB_XML +else + exit 1 +fi # Use the ckan key on the connector web.xml -[ ! -z $CKAN_KEY ] && sed -i -e "s#@CKAN_SECRET@#${CKAN_KEY}#g" $CK_WEB_XML +if [ ! -z $CKAN_KEY ] ; then + sed -i -e "s#@CKAN_SECRET@#${CKAN_KEY}#g" $CK_WEB_XML +else + exit 1 +fi + chown {{ smartgears_user }}:{{ smartgears_user }} $CK_WEB_XML chmod 440 $CK_WEB_XML