From 464cb38916c5dee5d5e47c5f863f77234d0c1de0 Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Thu, 5 Jun 2025 13:10:56 +0200 Subject: [PATCH] Add openresty convenience wrapper --- bin/resty-here | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 bin/resty-here 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;" "$@"