2022-02-08 10:51:47 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
set -x
|
|
|
|
|
|
|
|
|
|
# Openresty config
|
|
|
|
|
|
|
|
|
|
# -- Get openresty config path
|
2022-02-09 21:10:26 +08:00
|
|
|
openresty_sub_config_dir='/usr/local/openresty/nginx/conf.d'
|
2022-02-08 10:51:47 +08:00
|
|
|
echo $openresty_sub_config_dir
|
|
|
|
|
|
|
|
|
|
# -- Make sub config dir
|
|
|
|
|
mkdir -p $openresty_sub_config_dir
|
|
|
|
|
# -- Copy sun config file
|
|
|
|
|
cp conf/moicen/*.conf $openresty_sub_config_dir
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Lua scripts
|
|
|
|
|
|
|
|
|
|
# -- Get openresty install path
|
2022-02-09 21:10:26 +08:00
|
|
|
openresty_lua_scripts_dir='/usr/local/openresty/nginx/scripts'
|
2022-02-08 10:51:47 +08:00
|
|
|
echo $openresty_lua_scripts_dir
|
2022-02-08 13:57:15 +08:00
|
|
|
# -- Make scripts dir
|
2022-02-08 10:51:47 +08:00
|
|
|
mkdir -p $openresty_lua_scripts_dir
|
2022-02-08 13:57:15 +08:00
|
|
|
# -- Copy scripts file
|
2022-02-08 10:51:47 +08:00
|
|
|
cp scripts/*.lua $openresty_lua_scripts_dir
|
2022-02-08 13:57:15 +08:00
|
|
|
# -- Replace scripts path in file
|
2022-02-09 21:10:26 +08:00
|
|
|
sed -i -e "s|<SCRIPT_PATH>|$openresty_lua_scripts_dir|" \
|
2022-02-08 13:57:15 +08:00
|
|
|
"$openresty_lua_scripts_dir"/combine.lua \
|
|
|
|
|
"$openresty_lua_scripts_dir"/convert_audio.lua \
|
|
|
|
|
"$openresty_lua_scripts_dir"/test_upyun_upload.lua \
|
|
|
|
|
"$openresty_lua_scripts_dir"/upyun_upload.lua
|
2022-02-08 10:51:47 +08:00
|
|
|
|
|
|
|
|
# Reload openresty
|
|
|
|
|
openresty -t
|
|
|
|
|
openresty -s reload
|