Skip to content

Instantly share code, notes, and snippets.

@rawnly
Created April 27, 2018 14:20
Show Gist options
  • Save rawnly/be2304cec7a82abc3a229af269d2e076 to your computer and use it in GitHub Desktop.
Save rawnly/be2304cec7a82abc3a229af269d2e076 to your computer and use it in GitHub Desktop.
Manage nginx service
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