Created
April 27, 2018 14:20
-
-
Save rawnly/be2304cec7a82abc3a229af269d2e076 to your computer and use it in GitHub Desktop.
Manage nginx service
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
function webserver { | |
case "$1" in | |
"check") | |
nginx -t | |
;; | |
"stop"|"start"|"restart"|"status") | |
systemctl $1 nginx; | |
;; | |
*) | |
echo "Usage:\n $ $0 {start|stop|restart|check|status}"; | |
esac | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment