Created
November 1, 2018 15:41
-
-
Save golubov-andrey/e17b162fa1bdb12b4a81a50f37d7ead9 to your computer and use it in GitHub Desktop.
Enable Nginx site
This file contains hidden or 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/bash | |
| SITE=$1 | |
| CFG_SITE="/etc/nginx/sites-available/$SITE.conf" | |
| CFG_TARGET="/etc/nginx/sites-enabled/$SITE.conf" | |
| if [ -z $SITE ] ; then | |
| echo "First parameter is nil. Enter needed site enabled" | |
| elif [ -f $CFG_SITE ] ; then | |
| ln -s $CFG_SITE $CFG_TARGET | |
| else | |
| echo "Config file for '$SITE' not found" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment