Add the "SHORT_URL" environment for docker image sub

This commit is contained in:
musk-1024
2024-07-03 23:21:21 +08:00
committed by GitHub
parent 2717be91ad
commit 9c058c6faa

View File

@@ -11,6 +11,11 @@ else
echo "如需修改请在容器启动时使用 -e API_URL='https://sub.ops.ci' 传递环境变量" echo "如需修改请在容器启动时使用 -e API_URL='https://sub.ops.ci' 传递环境变量"
fi fi
if [ $SHORT_URL ]; then
echo "当前短链接地址为: $SHORT_URL"
sed -i "s#https://s.ops.ci#$SHORT_URL#g" /usr/share/nginx/html/conf/config.js
fi
if [ $SITE_NAME ]; then if [ $SITE_NAME ]; then
sed -i "s#Subconverter Web#$SITE_NAME#g" /usr/share/nginx/html/conf/config.js sed -i "s#Subconverter Web#$SITE_NAME#g" /usr/share/nginx/html/conf/config.js
fi fi