use direct path
This commit is contained in:
@@ -4,9 +4,7 @@ set -x
|
|||||||
# Openresty config
|
# Openresty config
|
||||||
|
|
||||||
# -- Get openresty config path
|
# -- Get openresty config path
|
||||||
openresty_config_file_path=$(openresty -t 2>&1 | tr '\n' '\f' | sed -r 's/.*file[[:space:]](.*)[[:space:]]syntax.*/\1/')
|
openresty_sub_config_dir='/usr/local/openresty/nginx/conf.d/'
|
||||||
openresty_config_path=${openresty_config_file_path%/*}
|
|
||||||
openresty_sub_config_dir=$openresty_config_path/conf.d
|
|
||||||
echo $openresty_sub_config_dir
|
echo $openresty_sub_config_dir
|
||||||
|
|
||||||
# -- Make sub config dir
|
# -- Make sub config dir
|
||||||
@@ -18,17 +16,14 @@ cp conf/alchemy/*.conf $openresty_sub_config_dir
|
|||||||
# Lua scripts
|
# Lua scripts
|
||||||
|
|
||||||
# -- Get openresty install path
|
# -- Get openresty install path
|
||||||
openresty_install_path=$(openresty -V 2>&1 | tr '\n' '\f' | sed -r 's/.*--prefix=(.*)[[:space:]]--with-cc.*/\1/')
|
openresty_lua_scripts_dir='/usr/local/openresty/nginx/scripts'
|
||||||
openresty_lua_scripts_dir=$openresty_install_path/scripts
|
|
||||||
echo $openresty_lua_scripts_dir
|
echo $openresty_lua_scripts_dir
|
||||||
# -- Make scripts dir
|
# -- Make scripts dir
|
||||||
mkdir -p $openresty_lua_scripts_dir
|
mkdir -p $openresty_lua_scripts_dir
|
||||||
# -- Copy scripts file
|
# -- Copy scripts file
|
||||||
cp scripts/*.lua $openresty_lua_scripts_dir
|
cp scripts/*.lua $openresty_lua_scripts_dir
|
||||||
# -- Replace scripts path in file
|
# -- Replace scripts path in file
|
||||||
replaced_scripts_path=$(echo $openresty_lua_scripts_dir | sed 's_/_\\/_g')
|
sed -i -e "s|<SCRIPT_PATH>|$openresty_lua_scripts_dir|" \
|
||||||
echo "$replaced_scripts_path"
|
|
||||||
sed -i -e "s/<SCRIPT_PATH>/$replaced_scripts_path/" \
|
|
||||||
"$openresty_lua_scripts_dir"/combine.lua \
|
"$openresty_lua_scripts_dir"/combine.lua \
|
||||||
"$openresty_lua_scripts_dir"/convert_audio.lua \
|
"$openresty_lua_scripts_dir"/convert_audio.lua \
|
||||||
"$openresty_lua_scripts_dir"/test_upyun_upload.lua \
|
"$openresty_lua_scripts_dir"/test_upyun_upload.lua \
|
||||||
|
|||||||
@@ -4,9 +4,7 @@ set -x
|
|||||||
# Openresty config
|
# Openresty config
|
||||||
|
|
||||||
# -- Get openresty config path
|
# -- Get openresty config path
|
||||||
openresty_config_file_path=$(openresty -t 2>&1 | tr '\n' '\f' | sed -r 's/.*file[[:space:]](.*)[[:space:]]syntax.*/\1/')
|
openresty_sub_config_dir='/usr/local/etc/openresty/conf.d'
|
||||||
openresty_config_path=${openresty_config_file_path%/*}
|
|
||||||
openresty_sub_config_dir=$openresty_config_path/conf.d
|
|
||||||
echo $openresty_sub_config_dir
|
echo $openresty_sub_config_dir
|
||||||
|
|
||||||
# -- Make sub config dir
|
# -- Make sub config dir
|
||||||
@@ -18,17 +16,14 @@ cp conf/local_macos/*.conf $openresty_sub_config_dir
|
|||||||
# Lua scripts
|
# Lua scripts
|
||||||
|
|
||||||
# -- Get openresty install path
|
# -- Get openresty install path
|
||||||
openresty_install_path=$(openresty -V 2>&1 | tr '\n' '\f' | sed -r 's/.*--prefix=(.*)[[:space:]]--with-cc.*/\1/')
|
openresty_lua_scripts_dir='/usr/local/opt/openresty/nginx/scripts'
|
||||||
openresty_lua_scripts_dir=$openresty_install_path/scripts
|
|
||||||
echo $openresty_lua_scripts_dir
|
echo $openresty_lua_scripts_dir
|
||||||
# -- Make scripts dir
|
# -- Make scripts dir
|
||||||
mkdir -p $openresty_lua_scripts_dir
|
mkdir -p $openresty_lua_scripts_dir
|
||||||
# -- Copy scripts file
|
# -- Copy scripts file
|
||||||
cp scripts/*.lua $openresty_lua_scripts_dir
|
cp scripts/*.lua $openresty_lua_scripts_dir
|
||||||
# -- Replace scripts path in file
|
# -- Replace scripts path in file
|
||||||
replaced_scripts_path=$(echo $openresty_lua_scripts_dir | sed 's_/_\\/_g')
|
sed -i -e "s|<SCRIPT_PATH>|$openresty_lua_scripts_dir|" \
|
||||||
echo "$replaced_scripts_path"
|
|
||||||
sed -i -e "s/<SCRIPT_PATH>/$replaced_scripts_path/" \
|
|
||||||
"$openresty_lua_scripts_dir"/combine.lua \
|
"$openresty_lua_scripts_dir"/combine.lua \
|
||||||
"$openresty_lua_scripts_dir"/convert_audio.lua \
|
"$openresty_lua_scripts_dir"/convert_audio.lua \
|
||||||
"$openresty_lua_scripts_dir"/test_upyun_upload.lua \
|
"$openresty_lua_scripts_dir"/test_upyun_upload.lua \
|
||||||
|
|||||||
@@ -4,9 +4,7 @@ set -x
|
|||||||
# Openresty config
|
# Openresty config
|
||||||
|
|
||||||
# -- Get openresty config path
|
# -- Get openresty config path
|
||||||
openresty_config_file_path=$(openresty -t 2>&1 | tr '\n' '\f' | sed -r 's/.*file[[:space:]](.*)[[:space:]]syntax.*/\1/')
|
openresty_sub_config_dir='/usr/local/openresty/nginx/conf.d'
|
||||||
openresty_config_path=${openresty_config_file_path%/*}
|
|
||||||
openresty_sub_config_dir=$openresty_config_path/conf.d
|
|
||||||
echo $openresty_sub_config_dir
|
echo $openresty_sub_config_dir
|
||||||
|
|
||||||
# -- Make sub config dir
|
# -- Make sub config dir
|
||||||
@@ -18,17 +16,14 @@ cp conf/moicen/*.conf $openresty_sub_config_dir
|
|||||||
# Lua scripts
|
# Lua scripts
|
||||||
|
|
||||||
# -- Get openresty install path
|
# -- Get openresty install path
|
||||||
openresty_install_path=$(openresty -V 2>&1 | tr '\n' '\f' | sed -r 's/.*--prefix=(.*)[[:space:]]--with-cc.*/\1/')
|
openresty_lua_scripts_dir='/usr/local/openresty/nginx/scripts'
|
||||||
openresty_lua_scripts_dir=$openresty_install_path/scripts
|
|
||||||
echo $openresty_lua_scripts_dir
|
echo $openresty_lua_scripts_dir
|
||||||
# -- Make scripts dir
|
# -- Make scripts dir
|
||||||
mkdir -p $openresty_lua_scripts_dir
|
mkdir -p $openresty_lua_scripts_dir
|
||||||
# -- Copy scripts file
|
# -- Copy scripts file
|
||||||
cp scripts/*.lua $openresty_lua_scripts_dir
|
cp scripts/*.lua $openresty_lua_scripts_dir
|
||||||
# -- Replace scripts path in file
|
# -- Replace scripts path in file
|
||||||
replaced_scripts_path=$(echo $openresty_lua_scripts_dir | sed 's_/_\\/_g')
|
sed -i -e "s|<SCRIPT_PATH>|$openresty_lua_scripts_dir|" \
|
||||||
echo "$replaced_scripts_path"
|
|
||||||
sed -i -e "s/<SCRIPT_PATH>/$replaced_scripts_path/" \
|
|
||||||
"$openresty_lua_scripts_dir"/combine.lua \
|
"$openresty_lua_scripts_dir"/combine.lua \
|
||||||
"$openresty_lua_scripts_dir"/convert_audio.lua \
|
"$openresty_lua_scripts_dir"/convert_audio.lua \
|
||||||
"$openresty_lua_scripts_dir"/test_upyun_upload.lua \
|
"$openresty_lua_scripts_dir"/test_upyun_upload.lua \
|
||||||
|
|||||||
Reference in New Issue
Block a user