diff --git a/bin/resty-here b/bin/resty-here new file mode 100755 index 0000000..db1ad27 --- /dev/null +++ b/bin/resty-here @@ -0,0 +1,17 @@ +#!/bin/sh + +if [ -f "openresty.conf" ] +then config="openresty.conf" +else + if [ -f "nginx.conf" ] + then config="nginx.conf" + else + config="openresty.conf" + cp /usr/local/openresty/example.conf $config + $EDITOR $config + fi +fi + +mkdir -p logs + +exec nginx -p $(pwd) -c $config -g "daemon off;" "$@"