Sha256: b22e68b18e36766ec8130f484a669343b74b66da5fcf21c15f03cd7055dfff9f
Contents?: true
Size: 1.05 KB
Versions: 47
Compression:
Stored size: 1.05 KB
Contents
#!/bin/sh -e SYSCONFDIR='<%= @node[:apache][:dir] %>' if [ -z $1 ]; then echo "Which module would you like to enable?" echo -n "Your choices are: " ls $SYSCONFDIR/mods-available/*.load | \ sed -e "s,$SYSCONFDIR/mods-available/,,g" | sed -e 's/\.load$//g;' | xargs echo echo -n "Module name? " read MODNAME else MODNAME=$1 fi #figure out if we're on a prefork or threaded mpm if [ -x /usr/sbin/apache2 ]; then PREFORK=`/usr/sbin/apache2 -l | grep prefork || true` fi if [ -e $SYSCONFDIR/mods-enabled/$MODNAME.load ]; then echo "This module is already enabled!" exit 0 fi if ! [ -e $SYSCONFDIR/mods-available/$MODNAME.load ]; then echo "This module does not exist!" exit 1 fi for i in conf load; do if [ -e $SYSCONFDIR/mods-available/$MODNAME.$i -a ! -e $SYSCONFDIR/mods-enabled/$MODNAME.$i ]; then ln -sf $SYSCONFDIR/mods-available/$MODNAME.$i $SYSCONFDIR/mods-enabled/$MODNAME.$i; fi done echo "Module $MODNAME installed; reload apache to enable."
Version data entries
47 entries across 47 versions & 3 rubygems