Sha256: 2da42d090b7518fe6d11fe67d17a473d3f15fb92b8780a3eed3225ec5785f282

Contents?: true

Size: 812 Bytes

Versions: 67

Compression:

Stored size: 812 Bytes

Contents

#!/bin/sh -e

SYSCONFDIR='<%= @node[:apache][:dir] %>'

if [ -z $1 ]; then
        echo "Which site would you like to disable?"
        echo -n "Your choices are: "
        ls $@node[:apache][:dir]/sites-enabled/* | \
        sed -e "s,$SYSCONFDIR/sites-enabled/,,g" | xargs echo
        echo -n "Site name? "
        read SITENAME
else
        SITENAME=$1
fi

if [ $SITENAME = "default" ]; then
        PRIORITY="000"
fi

if ! [ -e $SYSCONFDIR/sites-enabled/$SITENAME -o \
       -e $SYSCONFDIR/sites-enabled/"$PRIORITY"-"$SITENAME" ]; then
        echo "This site is already disabled, or does not exist!"
        exit 1
fi

if ! rm $SYSCONFDIR/sites-enabled/$SITENAME 2>/dev/null; then
        rm -f $SYSCONFDIR/sites-enabled/"$PRIORITY"-"$SITENAME"
fi
echo "Site $SITENAME disabled; reload apache to disable."

Version data entries

67 entries across 67 versions & 3 rubygems

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