Created
October 11, 2017 14:41
-
-
Save koninka/317b92b0bab92904395d5598e4818ba2 to your computer and use it in GitHub Desktop.
OSx a2dissite
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
APACHE_DIR="/usr/local/etc/httpd" | |
CONF="$1" | |
if [ ! -f "$APACHE_DIR/sites-available/$CONF" ]; then | |
echo "$APACHE_DIR/sites-available/$CONF does not exist" | |
exit | |
fi | |
if [ ! -f "$APACHE_DIR/sites-enabled/$CONF" ]; then | |
echo "$CONF already disabled!" | |
exit | |
fi | |
# echo $CONF | |
# echo "$APACHE_DIR/sites-enabled/$CONF" | |
# echo "$APACHE_DIR/sites-available/$CONF" | |
rm -f "$APACHE_DIR/sites-enabled/$CONF" | |
echo "$CONF has been disabled" | |
sudo apachectl restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment