Sha256: 2c4c5680128bf663cfbe06495195537889a3e7940a5f224a2851c4061c0b77eb

Contents?: true

Size: 800 Bytes

Versions: 16

Compression:

Stored size: 800 Bytes

Contents

#!/bin/sh -e

SYSCONFDIR='<%= node[:nginx][:dir] %>'

if [ -z $1 ]; then
        echo "Which site would you like to disable?"
        echo -n "Your choices are: "
        ls $SYSCONFDIR/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 nginx to disable."

Version data entries

16 entries across 16 versions & 3 rubygems

Version Path
mana-0.0.10 cookbooks/nginx/templates/default/nxdissite.erb
mana-0.0.8 cookbooks/nginx/templates/default/nxdissite.erb
mana-0.0.7 cookbooks/nginx/templates/default/nxdissite.erb
mana-0.0.6 cookbooks/nginx/templates/default/nxdissite.erb
mana-0.0.5 cookbooks/nginx/templates/default/nxdissite.erb
elzar-0.2.0 chef/site-cookbooks/nginx/templates/default/nxdissite.erb
mana-0.0.4 cookbooks/nginx/templates/default/nxdissite.erb
elzar-0.1.2 chef/site-cookbooks/nginx/templates/default/nxdissite.erb
mana-0.0.3 cookbooks/nginx/templates/default/nxdissite.erb
mana-0.0.2 cookbooks/nginx/templates/default/nxdissite.erb
mana-0.0.1 cookbooks/nginx/templates/default/nxdissite.erb
elzar-0.1.1 chef/site-cookbooks/nginx/templates/default/nxdissite.erb
elzar-0.1.0 chef/site-cookbooks/nginx/templates/default/nxdissite.erb
elzar-0.0.2 chef/site-cookbooks/nginx/templates/default/nxdissite.erb
elzar-0.0.1 site-cookbooks/nginx/templates/default/nxdissite.erb
rails-up-0.0.1 templates/chef/cookbooks/nginx/templates/default/nxdissite.erb