Sha256: 7b180f0326825d4bf26058ed54fa77cc2856a667ed0512d25d29b998ca296e4b
Contents?: true
Size: 1.1 KB
Versions: 7
Compression:
Stored size: 1.1 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 -a -e $SYSCONFDIR/mods-enabled/$MODNAME.conf ]; 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
7 entries across 6 versions & 4 rubygems