rename dir
This commit is contained in:
Executable
+32
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
set -x
|
||||
|
||||
# Openresty config
|
||||
|
||||
# -- Get openresty config path
|
||||
openresty_sub_config_dir='/usr/local/openresty/nginx/conf.d'
|
||||
echo $openresty_sub_config_dir
|
||||
|
||||
# -- Make sub config dir
|
||||
mkdir -p $openresty_sub_config_dir
|
||||
# -- Copy sun config file
|
||||
cp conf/huiwings/*.conf $openresty_sub_config_dir
|
||||
|
||||
|
||||
# Lua scripts
|
||||
|
||||
# -- Get openresty install path
|
||||
openresty_lua_scripts_dir='/usr/local/openresty/nginx/scripts'
|
||||
echo $openresty_lua_scripts_dir
|
||||
# -- Make scripts dir
|
||||
mkdir -p $openresty_lua_scripts_dir
|
||||
# -- Copy scripts file
|
||||
cp -rv scripts/* $openresty_lua_scripts_dir
|
||||
# -- Replace scripts path in file
|
||||
sed -i -e "s|<SCRIPT_PATH>|$openresty_lua_scripts_dir|g" \
|
||||
"$openresty_lua_scripts_dir"/*.lua \
|
||||
"$openresty_lua_scripts_dir"/lib/*.lua \
|
||||
|
||||
# Reload openresty
|
||||
openresty -t
|
||||
openresty -s reload
|
||||
Reference in New Issue
Block a user