#!/bin/sh

if docker ps | grep -q 'ckan$'; then
    lxc-execute -n ckan -- paster --plugin=ckan tracking update -c /etc/ckan/ckan.ini >/dev/null
    lxc-execute -n ckan -- paster --plugin=ckan search-index rebuild -r -c /etc/ckan/ckan.ini >/dev/null
fi
