File: //usr/local/bin/enable_apache_cache.sh
#!/bin/bash
AVAL_DIR=/etc/apache2/mods-available
ENABLE_DIR=/etc/apache2/mods-enabled
if [ -z "$APACHE_CACHE" ]; then
[ -z "$_DEBUG" ] || echo "Cache disabled."
else
[ -L $ENABLE_DIR/cache.conf ] || /bin/ln -s $AVAL_DIR/cache.conf $ENABLE_DIR/cache.conf
[ -L $ENABLE_DIR/cache.load ] || /bin/ln -s $AVAL_DIR/cache.load $ENABLE_DIR/cache.load
[ -L $ENABLE_DIR/cache_disk.conf ] || /bin/ln -s $AVAL_DIR/cache_disk.conf $ENABLE_DIR/cache_disk.conf
[ -L $ENABLE_DIR/cache_disk.load ] || /bin/ln -s $AVAL_DIR/cache_disk.load $ENABLE_DIR/cache_disk.load
[ -z "$_DEBUG" ] || echo "Cache enabled."
fi