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

Version Path
auser-poolparty-1.1.4 vendor/chef/apache2/templates/default/a2enmod.erb
auser-poolparty-1.1.5 vendor/chef/apache2/templates/default/a2enmod.erb
auser-poolparty-1.1.6 vendor/chef/apache2/templates/default/a2enmod.erb
auser-poolparty-1.1.7 vendor/chef/apache2/templates/default/a2enmod.erb
auser-poolparty-1.2.0 vendor/chef/apache2/templates/default/a2enmod.erb
auser-poolparty-1.2.1 vendor/chef/apache2/templates/default/a2enmod.erb
auser-poolparty-1.2.10 vendor/chef/apache2/templates/default/a2enmod.erb
auser-poolparty-1.2.11 vendor/chef/apache2/templates/default/a2enmod.erb
auser-poolparty-1.2.12 vendor/chef/apache2/templates/default/a2enmod.erb
auser-poolparty-1.2.2 vendor/chef/apache2/templates/default/a2enmod.erb
auser-poolparty-1.2.3 vendor/chef/apache2/templates/default/a2enmod.erb
auser-poolparty-1.2.4 vendor/chef/apache2/templates/default/a2enmod.erb
auser-poolparty-1.2.7 vendor/chef/apache2/templates/default/a2enmod.erb
auser-poolparty-1.2.8 vendor/chef/apache2/templates/default/a2enmod.erb
auser-poolparty-1.2.9 vendor/chef/apache2/templates/default/a2enmod.erb
auser-poolparty-1.3.0 vendor/chef/apache2/templates/default/a2enmod.erb
auser-poolparty-1.3.1 vendor/chef/apache2/templates/default/a2enmod.erb
auser-poolparty-1.3.10 vendor/chef/apache2/templates/default/a2enmod.erb
auser-poolparty-1.3.11 vendor/chef/apache2/templates/default/a2enmod.erb
auser-poolparty-1.3.12 vendor/chef/apache2/templates/default/a2enmod.erb