Last active
August 31, 2017 13:17
-
-
Save svandragt/a41af34005feaa6118a8e20d15159b10 to your computer and use it in GitHub Desktop.
Site management scripts.
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/bash | |
# exit if not 1 argument | |
if [[ $# -ne 1 ]] ; then | |
echo 'This script accepts 1 argument.' | |
exit 1 | |
fi | |
rm /etc/nginx/sites-enabled/$1 | |
sudo nginx -t && sudo service nginx reload |
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/bash | |
# exit if not 1 argument | |
if [[ $# -ne 1 ]] ; then | |
echo 'This script accepts 1 argument.' | |
exit 1 | |
fi | |
sudo ln -s /etc/nginx/sites-available/$1 /etc/nginx/sites-enabled/$1 | |
sudo nginx -t && sudo service nginx reload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment