Skip to content

Commit

Permalink
Merge pull request #9 from jackloves111/main
Browse files Browse the repository at this point in the history
修复是否安装的判断逻辑
  • Loading branch information
Shurelol authored Jul 18, 2024
2 parents 3239c85 + 8c4166e commit ce18ccb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

read -p "请输入 Emby 容器名称:" name

echo "Emby-css安装中..."
echo "Emby-css安装中...
1.先检查插件
2.再修改首页html"

# 使用 docker exec 检查文件是否存在
if docker exec "$name" test -f "/config/plugins/Emby.CustomCssJS.dll"; then
Expand Down Expand Up @@ -46,10 +48,11 @@ function Installing() {
docker cp $name:/system/dashboard-ui/app.js ./

# 如果不包含替换内容
if ! grep -c "CustomCssJS.js" app.js; then
count=$(grep -c "CustomCssJS.js" app.js)
if [ "$count" -eq 0 ]; then
docker cp $name:/system/dashboard-ui/app.js ./
# 备份
docker exec -it $name mkdir -p /system/dashboard-ui/bak/
docker exec -it $name mkdir -p /system/dashboard-ui/bak/
docker cp ./app.js $name:/system/dashboard-ui/bak/
Installing
echo "成功!Index.html 首次安装!"
Expand Down

0 comments on commit ce18ccb

Please sign in to comment.