Add openresty convenience wrapper
This commit is contained in:
parent
3c8df651d1
commit
464cb38916
1 changed files with 17 additions and 0 deletions
17
bin/resty-here
Executable file
17
bin/resty-here
Executable file
|
@ -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;" "$@"
|
Loading…
Reference in a new issue