@@ -, +, @@ * apply the patch * a2dismod rewrite * run koha-create without sudo, note the error about being root * run koha-create with sudo, note the error about rewrite * a2enmod rewrute * repeat test above, note that it works --- debian/scripts/koha-create | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) --- a/debian/scripts/koha-create +++ a/debian/scripts/koha-create @@ -349,6 +349,26 @@ else MEMCACHED_PREFIX="" fi +# Are we root? If not, the mod_rewrite check will fail and be confusing, so +# we look into this first. +if [[ $UID -ne 0 ]] +then + die "This script must be run with root privileges." +fi + +# Check that mod_rewrite is installed so we can bail out if it's not. +if ! /usr/sbin/apachectl -M 2> /dev/null | grep -q 'rewrite_module' +then + cat 1>&2 <