Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add nginx_with_sudo to run nginx locally with sudo

  • Loading branch information...
commit 7f12cbcd1b2208073061dfbfc49e2a78c81829ad 1 parent 2d5d4ae
Naoto Kaneko authored
Showing with 14 additions and 0 deletions.
  1. +14 −0 nginx_with_sudo
View
14 nginx_with_sudo
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+NGINX_BIN="/usr/local/sbin/nginx"
+
+function on_die() {
+ sudo $NGINX_BIN -s stop
+ exit 0
+}
+
+trap on_die TERM
+
+sudo $NGINX_BIN $@ &
+
+wait
Please sign in to comment.
Something went wrong with that request. Please try again.